E
E
Evgeny Perin2016-01-22 23:52:16
PHP
Evgeny Perin, 2016-01-22 23:52:16

A quick way to find out the page server's response?

There is a large array of urls, you need to find out the server response codes for each of them using php. How can I get the status as quickly as possible without downloading each page with curl or file_get_contents? Because in these ways a large array is processed for a very long time

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2016-01-22
@seoperin

- get only headers: CURLOPT_HEADER, CURLOPT_NOBODY
- use the HEAD method instead of GET
and, of course, multicurl if you need speed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question