I use curl to grab a page of a website. Suppose the url of that page was like this:
Recently that site applied a 302 redirection in pageA.php, so that when I try to grab the page from that url it shows me a 302 redirection with new location like this:
As far I know, if I type this new location into browser's address field or grab that new location by curl, it should be shown by browser or curl should grab it from new location. But watch on the new location string. It has double "?" marks, one as a GET parameter and second one is created as a redirection to the new location. So if I type-
on browser's address field or set it as a CURLOPT_URL value, neither the browser shows it nor the curl can grab it as two "?" marks is invalid in a same url. But if I browse the http://www.example.com/pageA.php?file=onefile (without ?230562), browser shows me the content from the new location. So the new location is not invalid actually and browser can identify the new location from header. I think there is a replacement or special meaning of second "?" mark in the new location of 302 message.
Does anyone have any idea what should I write in the browser's address field or as a value of the CURLOPT_URL to grab the page from new location?