NameSilo

How do I parse a URL in PHP ?

SpaceshipSpaceship
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.
GoDaddyGoDaddy
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
•••
Truehost — .com domains from $4.99, hosting includedTruehost — .com domains from $4.99, hosting included

We're social

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