PHP Curl issue since November server upgrade

Status
Not open for further replies.

stokboss

New Member
Messages
5
Reaction score
0
Points
0
After the server updates a few days ago I'm having trouble with a curl routine in one of my web pages.

Here is the code:

$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
$addy = 'http://moneyweb.profile.co.za/moneyweb/sharedata/data/009429/PriceData_1TM.htm';
curl_setopt($curl_handle, CURLOPT_URL, $addy);
$html = curl_exec($curl_handle);
echo curl_error($curl_handle);


The error returned is "couldn't connect to host" It is possible but unlikely that this this server has blocked me from accessing their site. I can still access other sites from the curl routine. Any help would be appreciated.
 

Slothie

New Member
Messages
1,429
Reaction score
0
Points
0
That means they've blocked you. Tough luck. But its normal when you scrape a site for data too often.


Use a proxy, if you can find a reliable one.
 

stokboss

New Member
Messages
5
Reaction score
0
Points
0
Thanks man, that's what I feared.

I'm making a virtual stock market competition and I needed to scrape share prices. I guess I'll have to rely on honesty because it's just a bunch of friends taking part.
 
Status
Not open for further replies.
Top