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!



Join the forum, it's quick and easy

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!

Kreative Flow Designs
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Pull the URL from address bar in PHP

Go down

Pull the URL from address bar in PHP Empty Pull the URL from address bar in PHP

Post by Henryz 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:

Code:

<?php
$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
Henryz
Henryz
Gold Member
Gold Member

Number of posts : 109
Flow Points : 241
Reputation : 3
Warnings :
Pull the URL from address bar in PHP Left_bar_bleue0 / 1000 / 100Pull the URL from address bar in PHP Right_bar_bleue

Mood : Pull the URL from address bar in PHP 34689ar

http://www.webvicious.com, http://www.Henry.Brown.Name

Back to top Go down

Back to top


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