Return to Snippet

Revision: 13120
at April 9, 2009 15:34 by fackz


Initial Code
<?php
// URL:
$site = "http://www.site.com.br/teste";
// SPLITS URL FROM HTTP://:
$url = explode("http://", $site);
// CLEAN THE RESULT , LEAVE THE MAIN ADDRESS:
$site = dirname($url[1].'<br>');
// SHOW:
echo($site);
?>

Initial URL

                                

Initial Description

                                

Initial Title
Gets the main url fo http_reffer

Initial Tags
url

Initial Language
PHP