Is get_headers() function overloading my Apache server?

56 Views Asked by At
$url = "https://www.sportsdirect.com/york-monks-cross-store-1099";
$context = stream_context_create( [
        'ssl' => [
            'verify_peer' => false,
            'verify_peer_name' => false,
        ],
    ]);
        
$headers = get_headers($url, 0, $context);

This piece of code is overloading my Apache sever and my other websites that are hosted in the same server “does not work”, I mean other websites are loading forever until browser says ERR_CONNECTION_TIMED_OUT while the above PHP script is running.

Can anyone explain or suggest me an alternative.

0

There are 0 best solutions below