http://blog.DoZarte.com


Estrapolare il nome del dominio da un URL


Share to Facebook Share to Twitter Stumble It Email This More...

Dato un indirizzo internet (URL o URI) ecco come estrarne il dominio di appartenenza, in PHP:

// trova il nome del sito
$url="http://nome del sito...";
$mystring = substr($url, 7);
$pos = strpos($mystring, '/');
$sito = substr($mystring, 0, $pos);


Share to Facebook Share to Twitter Stumble It Email This More...

Se l'articolo era interessante, forse troverai approfondimenti nei seguenti link sponsorizzati...


Leave a Reply

XHTML: Tags concessi: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

You can add images to your comment by clicking here.