NameSilo

How do I parse a URL in PHP ?

SpaceshipSpaceship
Watch

marcel

Established Member
Impact
3
how do I parse a URL in PHP ?
I want to make sure the link is a real website. any known classes for this ?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
0
•••
you can also add this function, to know if the site is existing

PHP:
function if_url_exist($url) {
    $fp = @fopen($url,"r");
    if ($fp) {
        fclose($fp);
       $ret ="Y";
    } else {
        $ret ="N";
    }
	return $ret;
} 

//test
$url="http://www.bigvertiser.com";
$test = if_url_exist($url);
echo $test;
 
0
•••
There is also parse_url
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back