Some php pages can distinguish whether the client access it from the main page or link the page directly. If we use Stringbean to link the page directly, the server will return an error information instead of the web page we desire to fetch.
You may need to condition the HTTP connection (probably by just adding the "Referer" request property) and pass it in to the StringBean. There is an example (using forms, but the idea is the same) at: http://htmlparser.sourceforge.net/wiki/index.php/PostOperation
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Some php pages can distinguish whether the client access it from the main page or link the page directly. If we use Stringbean to link the page directly, the server will return an error information instead of the web page we desire to fetch.
The example main page: http://www.cna.com.tw/
One sub-page from the main page: http://www.cna.com.tw/ciplist.php?date=1098351005&class=2PF
Could anyone please help me solve this problem? Thanks a lot
You may need to condition the HTTP connection (probably by just adding the "Referer" request property) and pass it in to the StringBean. There is an example (using forms, but the idea is the same) at:
http://htmlparser.sourceforge.net/wiki/index.php/PostOperation
thanks a lot! It works!