Thursday, 28 April 2016 16:27

How can parse URL in joomla

$uri = 'http://fredbloggs:itsasecret@www.example.com:8080/path/to/Joomla/index.php?task=view&id=32#anchorthis';
$u =& JURI::getInstance( $uri );
echo 'URI is ' . $u->toString() . "\n";
$u->parse( 'https://www.example.com/joomla/index.php' ); echo 'URI is ' . $u->toString() . "\n";