Why is cURL reporting an invalid IP address as an error?

0smaneLka.

New Member
I have the following PHP code that uses cURL:\[code\]$ch = curl_init();curl_setopt($ch,CURLOPT_URL,"http://area51.stackexchange.com/users/flair/31.json");curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);$a_data = http://stackoverflow.com/questions/3739711/json_decode(curl_exec($ch));echo curl_error($ch);\[/code\]I then get the following error when I try to access the page over HTTP:\[quote\] Failed to connect to 0.0.0.31: Invalid argument\[/quote\]However, the code works fine when run from the command line.What could possible cause cURL to try to connect to 0.0.0.31, which is AFAIK, not even a valid IP address?
 
Back
Top