Answer the question
In order to leave comments, you need to log in
Why does the error "Failed to connect to site.ru port 80: Connection refused" occur when parsing sites via CURL?
For some reason, on my VPS server, the CURL function cannot get some pages. For example, for the site akpphelp.ru:
<?php
if ($ch = @curl_init())
{
@curl_setopt($ch, CURLOPT_URL, 'http://akpphelp.ru');
@curl_setopt($ch, CURLOPT_HEADER, false);
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
$data = @curl_exec($ch);
echo $data;
echo curl_error($ch);
@curl_close($ch);
}
?>
Failed to connect to akpphelp.ru port 80: Connection refused
traceroute akpphelp.ru traceroute to akpphelp.ru
(186.2.163.244), 30 hops max, 60 byte packets
1 * * * 6 * * * 7 * * * 8 * * * 9 * * * 10 * * * 11 * * * 12 * * * 13 * * * 14 * * * 15 * * * 16 * * * 17 * * * 18 * * * 19 * * * 20 * * * 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * *
thirty * * *
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question