Kreative Flow Designs
Thanks for visiting Kreative Flow. You'll recieve the best tutorials, resources and graphic information here.

Do register if you are a guest for exclusive content only for members!

Pull the URL from address bar in PHP

Go down

Pull the URL from address bar in PHP

Post by Henryz on Sat 04 Apr 2009, 2:35 pm

When your writing PHP, being able to pull the address bar down from the address bar can be very handy... If you are modding the search bar in WordPress for example.

This is the code I changed to suit my Wordpress theme:


$domain = $_SERVER['HTTP_HOST'];
$path = $_SERVER['SCRIPT_NAME'];
$queryString = $_SERVER['QUERY_STRING'];
$url = "http://" . $domain . $path . "?" . $queryString;
echo "" . $url . "";

Also useful for bookmarking scripts Smile
Gold Member
Gold Member

Number of posts : 109
Flow Points : 241
Reputation : 3
Warnings :
0 / 1000 / 100

Mood :

View user profile, http://www.Henry.Brown.Name

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum