I am trying to send a URL to a webpage like the following:
http://siteone.com/?url=http://google.com
This I have got working fine but when there are additional variables in the second URL this is when problems occur, E.g.
http://siteone.com/?url=http://googl...ch=keyword&c=1
So Instead of doing it like this (I am the original person that sends the URL data in the URL) I have changed it so that I search and replace all &'s with ;'s before it is sent with the following:
$url = $subfetch['link'];
$url = str_replace("&",";",$url);
header ("location:".$url);
But for some reason it is not replacing the & symbols. I can see in my browser that the next page says:
http://siteone.com/?url=http://googl...ch=keyword&c=1
Instead of replacing the &'s with ;'s.
Can anyone see what I am doing wrong here or know of an alternative way to obtain a URL from a URL like this?