$url="http://www.domain.com/demo.jpg";$headers=@get_headers($url);if(strpos($headers[0],'404')===false){echo"URL Exists";}else{echo"URL Not Exists";}
Python
fromurllib2importurlopencode=urlopen("https://kipalog.com").codeifcode==200:print"Exists!"# Or
importurllib2ret=urllib2.urlopen('https://kipalog.com')ifret.code==200:print"Exists!"
Top comments (0)