Getting all pages from URL + emulate postback from asp.net
Posted: Mon Aug 07, 2006 8:03 am
Hello,
what I have:
$url = 'an_url_that_points_to_the_first_page_of_the_site';
$pageContent = stream_get_contents( fopen($url,'r') );
so till now I have the first page I need from the site.
Looking in the page source I understand that it is written in ASP.NET, and to navigate to next page is used the 'postbak' mechanism of the ASP.NET.
In the $pageContent (or page source) there is a INPUT of type='hidden" that stores the number of current page.
When you want to navigate to next page by pressing corresponding link, the postaback is changing the value for that input and makes the request.
So as I understand there is no POST used, to indicate the page number that I can use it too to get in my $pageContent the next page.
question:
What I do to get all pages (for ex: 5 of them), and have them consecutively in $pageContent ? because there is no user input and there is no JS code accepted since the php core runs on server only.
If I have some misunderstanding , I'm open to corrections.
what I have:
$url = 'an_url_that_points_to_the_first_page_of_the_site';
$pageContent = stream_get_contents( fopen($url,'r') );
so till now I have the first page I need from the site.
Looking in the page source I understand that it is written in ASP.NET, and to navigate to next page is used the 'postbak' mechanism of the ASP.NET.
In the $pageContent (or page source) there is a INPUT of type='hidden" that stores the number of current page.
When you want to navigate to next page by pressing corresponding link, the postaback is changing the value for that input and makes the request.
So as I understand there is no POST used, to indicate the page number that I can use it too to get in my $pageContent the next page.
question:
What I do to get all pages (for ex: 5 of them), and have them consecutively in $pageContent ? because there is no user input and there is no JS code accepted since the php core runs on server only.
If I have some misunderstanding , I'm open to corrections.