PHP error: php_network_getaddresses: getaddrinfo failed: (while getting information from other site.)
It's because you can't resolve the host name
Maybe DNS problems, host is unreachable...
try to use IP address instead of host name...
ping this host name... nslookup it...
Getting connection failed: php_network_getaddresses: getaddrinfo failed: Name or service not known
My database is on the same machine so I just needed to edit:
$servername = "localhost"
Now everything is working just fine.
php_network_getaddresses: getaddrinfo failed: Name or service not known
If you only want to submit GET data to the URL, you should use something straightforward like file_get_contents();
$myGetData = "?var1=val1&var2=val2";
file_get_contents($url.$myGetData);
Related Topics
How to Set Default Value for Form Field in Symfony2
Laravel Eloquent Display Query Log
Dyld: Library Not Loaded: /Usr/Local/Lib/Libpng16.16.Dylib with Anything PHP Related
How Exactly Does If($Variable) Work
Using PHP Substr() and Strip_Tags() While Retaining Formatting and Without Breaking HTML
What's the Difference Between PHP's Dom and Simplexml Extensions
How to Generate a Random Key Within PHP
Uncaught Reflectionexception: Class Log Does Not Exist Laravel 5.2
How to Generate Unique Id in MySQL
How Add Class='Active' to HTML Menu with PHP