I am using windows xp.
Hi, I am really new to cURL (started today) and funnily enough haven't even got it to output anything yet!
Anway my problem is when using the following code I always get an error number 7 which is "cURL error:Failed to connect to 209.249.24.13: Connection refused". I have tried this on plenty of websites and keep getting the same error with just different ip adresses. I am using WAMP5 Version 1.7.3 and have php_curl.dll enabled but still nothing working... here is the code:
[php]
<?php
$ch = curl_init();
$target_url = "http://hiscore.runescape.com/index_lite.ws?player=Lustful_Mage";
curl_setopt($ch, CURLOPT_URL,$target_url);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$html = curl_exec($ch);
if (!$html) {
echo "<br />cURL error number:" .curl_errno($ch);
echo "<br />cURL error:" . curl_error($ch);
exit;
}
?>[/php]
|