Parsing a URL - Php Question
- by Adi Mathur
I am using the Following code
<?php
$url = 'http://www.ewwsdf.org/012Q/rhod-05.php?arg=value#anchor';
$parse = parse_url($url);
$lnk= "http://".$parse['host'].$parse['path'];
echo $lnk;
?>
This is giving me the output as
http://www.ewwsdf.org/012Q/rhod-05.php
How can i modify the code so that i get the output as
…