Answer the question
In order to leave comments, you need to log in
How to ignore 307 redirects with Curl?
There is a site with a reverse auction. It is made in such a way that when we flip pages from 1 to 2, from the second to the 3rd, and so on, the mysite/listing url does not change in any way. At the same time, if you manually enter an address like mysite/listing?page=3, then we get to page number 3.
This has been the case until now.
Now, by entering mysite/listing?page=3, we get the page with the URL mysite/listing?page=3, and the content on the page is mysite/listing. Redirect code 307.
If you stop loading the page in time by clicking the cross, then the redirect will not have time to occur and everything is fine.
1) Which CURL setting allows you to ignore 307 redirects? (this construct doesn't work curl_setopt($ch, CURLOPT_AUTOREFERER, 0);)
2) How can I stop the CURL script after 1 second, let's say, to get the content before the redirect? (similar to pressing the "Stop page loading" button)
3) The task is to seem like a real person. Is there a "danger" of calculating that I'm a bot, if all requests break off in the middle of the page?
4) If 3 is yes, what scheme will help you to continue to appear human? (for example, we download the page, before the redirect we save everything to the file "a", after the redirect we save the file "b". We work with the file "a")
5) Are there alternative ways to limit the 307 redirect? (For example, if you set ignoring some piece of code, or filtering through a proxy, in short, to make it simpler and work =))
Thank you in advance for all your answers.
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