get just a part from one web
Moderator: General Moderators
get just a part from one web
Hello
So i visited a web with a list of available jobs there was too much info in this page (4 mb plain text) and the webmaster of this page shows everything in just one page this represent a problem for the users of the page because the page takes too long to complete its loading
Thas why i want to download only a portion of that big page or try to get filtered content with php
This is the url:
http://clasificados.mexplaza.com.mx/cgi ... mpleos.cgi
Any ideas ?
So i visited a web with a list of available jobs there was too much info in this page (4 mb plain text) and the webmaster of this page shows everything in just one page this represent a problem for the users of the page because the page takes too long to complete its loading
Thas why i want to download only a portion of that big page or try to get filtered content with php
This is the url:
http://clasificados.mexplaza.com.mx/cgi ... mpleos.cgi
Any ideas ?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
[feyd@home]>php -r "preg_match_all('#<form.*?</form>.*?</blockquote>#s',file_get_contents('http://clasificados.mexplaza.com.mx/cgi-bin/clasificados/listarempleos.cgi'),$matches); echo count($matches[0]);"
3607thanks feyd
locally works great but when i tried to run this script in my web i got an error because it is to much time to download the file(more than 30 seconds ) also i think this is known as steal bandwith
i guess thats why i got that error in my web
i saw my bandwidth usage and still downloading the entire site,
So my question is:
will be possible to get filtered content from one web without downloading the entire html (for example download only the red font or only the links from the web without everything else)??
locally works great but when i tried to run this script in my web i got an error because it is to much time to download the file(more than 30 seconds ) also i think this is known as steal bandwith
i guess thats why i got that error in my web
i saw my bandwidth usage and still downloading the entire site,
So my question is:
will be possible to get filtered content from one web without downloading the entire html (for example download only the red font or only the links from the web without everything else)??
- raghavan20
- DevNet Resident
- Posts: 1451
- Joined: Sat Jun 11, 2005 6:57 am
- Location: London, UK
- Contact:
I dont know whether this function would be anyway useful
ignore_user_abort()
http://uk2.php.net/manual/en/function.i ... -abort.php
ignore_user_abort()
http://uk2.php.net/manual/en/function.i ... -abort.php
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
could use set_time_limit() as well or alternately...
hi again
i tried with both functions :
ignore_user_abort()
set_time_limit()
but now my problem is how to force this function to return the array when i finish the script:
or maybe i will look for a function to capture a number of bytes and print them, wich bring me into another problem.
this is cool
programming is like a really big puzzle
i tried with both functions :
ignore_user_abort()
set_time_limit()
but now my problem is how to force this function to return the array when i finish the script:
Code: Select all
preg_match_all('#<form.*?</form>.*?</blockquote>#s',file_get_contents('http://clasificados.mexplaza.com.mx/cgi-bin/clasificados/listarempleos.cgi'),$matches);this is cool
programming is like a really big puzzle