Hi everyone,
First of all:
I am using the following code:
// example: "site" =
http://www.google.com ....
$site = strtolower($_GET['site']);
$delete = array("http://", "ftp://","www.");
$show = str_replace($delete, "", $site);
// $show will hold the value "google.com"
this works! What doesn't work is if I put "site" as "http://www.google.com/adsense/root/images/whatever" it gives "http://www.google.com/adsense/root/images/whatever"
What is going wrong?
Secondly:
I also have another problem which I havent a clue how to fix.
When a "URL" is passed to my script in this way:
scriptname.php?site=http://www.google.com
it works fine, but if the URL has variables in it like:
?site=http://www.google.com/?q=Webmaster+World&LANG=UK
it chops of the &LANG part because it is concidered as another variable. How can I take only the variable "url" as a complete string (i.e the whole site URL) from start to finish?
Help is highly appreciated
