drisate Posted September 12, 2011 Share Posted September 12, 2011 I am having a very weird problem ... i am trying to check if a remote images existe ou not. I am using this code function url_exists($url) { $header_response = get_headers($url, 1); if ( strpos( $header_response[0], "404" ) !== false ){ return false; }else{ return true; } } but it returns: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution I cant seem to be able to find anywhere a way to fix this issue ... I tryed all sorts of difrent functions on the web an none seems to work so there must be something wrong with the server ... Ex: the following image needs to be fetched http://mls.cameleonmedia.info/SIA/MT8603541.jpg Quote Link to comment https://forums.phpfreaks.com/topic/246996-php_network_getaddresses/ Share on other sites More sharing options...
drisate Posted September 12, 2011 Author Share Posted September 12, 2011 It worked using the IP adresse instead of using the domain name ... weird ! ... Anybody has a clue? Quote Link to comment https://forums.phpfreaks.com/topic/246996-php_network_getaddresses/#findComment-1268506 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.