Curl probs.

Status
Not open for further replies.

proggrockaren35

New Member
Messages
2
Reaction score
0
Points
0
Does anyone know why i can curl my own site (which is www.letajobb.tk), but not an external site.

for instance, this works.

<?php
$ch = curl_init() or die(curl_error($ch));
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_URL,"www.letajobb.tk");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data1 = curl_exec($ch) or die(curl_error($ch));
echo htmlspecialchars($data1, ENT_QUOTES);
echo curl_error($ch);
curl_close($ch);
?>

but not

<?php
$ch = curl_init() or die(curl_error($ch));
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_URL,"www.introduction.se");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data1 = curl_exec($ch) or die(curl_error($ch));
echo htmlspecialchars($data1, ENT_QUOTES);
echo curl_error($ch);
curl_close($ch);
?>

from which i get "couldn't connect to host"?
Have tried other external sites to curl, always get the same error.

Thanx,

/ fhobbit
 

Anna

I am just me
Staff member
Messages
11,783
Reaction score
595
Points
113
We have blocked outbound access for port 80, which is why it works for your own domain, as that is within our network, and not the other.

This was done to combat a lot of abuse, with users uploading proxy scripts and rapidleech type of scripts to our free hosting and thus causing trouble for everyone else by hogging the resources.
 
Status
Not open for further replies.
Top