Earl Brown | 7 May 2012 08:24

FOLLOWLOCATION as true doesn't seem to work

PHP curl users,

I can't figure out why I can't get the html source code of:

http://corpusdelespanol.org/x2.asp

even though I can get the source code of:

http://corpusdelespanol.org/x.asp
http://corpusdelespanol.org/x1.asp
http://corpusdelespanol.org/x3.asp
http://corpusdelespanol.org/x4.asp

My PHP script starts at x.asp and gets a cookie and then passes
sequentially through the webpages. For some reason I can't get the
source code of x2.asp. Instead, I get the source of blank.asp. When I
use a browser (whether, Firefox, Chrome, Opera) I can see the source
code of x2.asp accurately, but curl doesn't give it to me. Instead it
gives me the source code of blank.asp, even though I have
FOLLOWLOCATION as true. I'm at a loss. One idea: x2.asp as some style
tag definitions above the opening <html> tag while the other pages
don't; the others start with the opening <html> tag and then define
styles. Could that throw off curl? Are browsers able to correct this
while curl is not? Here's my PHP script:

start of script
_____________

<?php

(Continue reading)


Gmane