PHP - Php_network_getaddresses
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 Similar TutorialsWhen I try to connect to my database I am getting this error: Quote Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\Envne\envne.com\mysqlAdmin\classes\Database.php on line 9 Warning: mysql_connect() [function.mysql-connect]: [2002] php_network_getaddresses: getaddrinfo failed: No such host is kn (trying to connect via tcp://root:3306) in C:\wamp\www\Envne\envne.com\mysqlAdmin\classes\Database.php on line 9 Warning: mysql_connect() [function.mysql-connect]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\Envne\envne.com\mysqlAdmin\classes\Database.php on line 9 Here is the EXACT code on line 9: mysql_connect('root', '', 'localhost'); I have never gotten this error before... how do I fix it? |