Y
Y
yevgeniyche2017-11-11 13:58:01
Gallery
yevgeniyche, 2017-11-11 13:58:01

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); 
        } 
?>

The page content is not displayed, but an error is displayed:
Failed to connect to akpphelp.ru port 80: Connection refused

Please, tell me what could be the problem? On another VPS server, this URL is parsed normally by the same code. Other sites also parsitsya normally.
traceroute output:
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

1 answer(s)
D
Dimonchik, 2017-11-11
@dimonchik2013

fail2ban and analogues on the akpphelp.ru side

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question