I call a php script http://site.com/process.phpthat takes url as one of its parameters.for=
http://site.com/process.php?for=http://www.anotherwebsite.com
Then I will do it and try parse_url(), but parse_url () throws a parsing error.
$uri = $_SERVER['REQUEST_URI']; // /process.php?for=http://www.anotherwebsite.com
parse_url($uri);
How can I encode a parameter foreither on the sending side (in the URL) or on the receiving side (php), so that I parse_url()understand that this is just a parameter that looks like a url?
source
share