Getting URL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

Getting URL

Post by psychotomus »

So I used $_SERVER['PHP_SELF']

and it returns jokes.php but the url itself is jokes.php?Jokes=Bar%20Jokes&?Joke=3

how do I get the full URL... alternatively I did this.

$the_url = str_replace(" ", "%20", "http://www.po2mob.com/jokes.php?Jokes=" . $_GET['Jokes'] . '&Joke=' . $_GET['Joke']);

so all " " is %20, but i get a T_VARIABLE error. any suggestions?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Did you ask this already?

viewtopic.php?t=37950
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

Post by psychotomus »

thats me aight. im out of it today. for a second i thought i posted this twice today. i did use search though =) so don't try to say i didnt cause i did.
Post Reply