i use this code:
<?php
$token="683911895:AAGGVHW_RdP9h4dfvXYPABJe-RGdfyj125g";
$url="https://api.telegram.org/bot" . $token . "/getupdates";
$content=file_get_contents($url);
var_dump ($content);
?>
but it have 2 errors:
1:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: A non-recoverable error occurred during a database lookup. in C:\wamp\www\tbot.php on line 5
2:
Warning: file_get_contents(https://api.telegram.org/bot683911895:AAGGVHW_RdP9h4dfvXYPABJe-RGdfyj125g/getupdates): failed to open stream: php_network_getaddresses: getaddrinfo failed: A non-recoverable error occurred during a database lookup. in C:\wamp\www\tbot.php on line 5
and telegram is ban in my country
check php settings "allow_url_fopen = On"
check the usage here http://www.php.net/manual/en/function.file-get-contents.php
if it still will not connect then you have an issue with the URL or DNS on your server.
Related
I have created production AdHoc .pem files. I have followed this steps:
By using This Link
I created .PEM file and i checked does this valid or not by using following command like:
$php simplepush.php
but i am getting an error like::
Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/mac-jarc/Desktop/SimplePush/simplepush.php on line 21
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known) in /Users/mac-jarc/Desktop/SimplePush/simplepush.php on line 21
Failed to connect: 0 php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
But in my PHP developer said it's a .PEM file mistake . I tought it's not(Because i am very sure my .PEM file is perfect) and i suggested to him like it's a server ports issue
Can you please help me out regarding this:: How would i check does my .PEM file is valid or not.
Here is my php code:
Database connection fail when trying to connect database at google app engine
error_reporting(E_ALL);
ini_set("display_errors", 1);
$con = mysql_connect('<host>','<username>','<password>') or die(mysql_error());
I got error message.
Warning: mysql_connect(): php_network_getaddresses: gethostbyname
failed. errno=0 in
/base/data/home/apps/s~testappgraymatics/1.388814076593258081/helloworld.php
on line 7 Warning: mysql_connect(): php_network_getaddresses:
gethostbyname failed. errno=0 in
/base/data/home/apps/s~testappgraymatics/1.388814076593258081/helloworld.php
on line 7 php_network_getaddresses: gethostbyname failed. errno=0
My VPS use PHP 5.5.8
when i test
<?php
$size = getimagesize('http://donikids.com/wp-content/uploads/2014/01/tu-dung-do-choi-tre-em-gk137.jpg');
var_dump($size);
?>
This error
Warning: getimagesize(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/donikids/public_html/test.php on line 2
Warning: getimagesize(http://donikids.com/wp-content/uploads/2014/01/tu-dung-do-choi-tre-em-gk137.jpg): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/donikids/public_html/test.php on line 2
bool(false)
You can check here
http://donikids.com/test.php
Please help me
Sorry for my english
try with this
<?php
$size = getimagesize($_SERVER['DOCUMENT_ROOT'].'/wp-content/uploads/2014/01/tu-dung-do-choi-tre-em-gk137.jpg');
var_dump($size);
?>
i am having a problem with PHP file_get_contents.
$html = file_get_html($csfd_link);
Writes an error:
Warning: file_get_contents() [function.file-get-contents]:
php_network_getaddresses: getaddrinfo failed: Name or service not
known in /home/vo003500/www_root/admin/simple_html_dom.php on line 76
Warning: file_get_contents(http://www.example.com/)
[function.file-get-contents]: failed to open stream:
php_network_getaddresses: getaddrinfo failed: Name or service not
known in /home/vo003500/www_root/admin/simple_html_dom.php on line 76
I do not know what it is. The server is allow_url_fopen ON
Thanks
Edit:
Until now it worked, but the last 2 weeks not working...
It looks like your suffering from DNS (Domain Name Service) resolution error. Make sure there is a proper DNS server entry in /etc/resolv.conf.
Since today my app throws this error:
Thanks for helping!
Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Temporärer Fehler bei der Namensauflösung in /var/www/modules/facebook/classes/facebookapi_php5_restlib.php on line 3663
Warning: fopen(http://api.facebook.com/restserver.php?method=facebook.fql.query&session_key=&api_key=6803c8d8b2e3a1fdh4sd154g755b757e&v=1.0) [function.fopen]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporärer Fehler bei der Namensauflösung in /var/www/modules/facebook/classes/facebookapi_php5_restlib.php on line 3663
This is not a programming issue, nor does it have anything to do with FQL.
It appears that your DNS server is failing, or is otherwise unavailable:
getaddrinfo failed: Temporary failure in name resolution
(translated from German above)
Also, you just published your API key publicly. I assume that's not a good idea.