RE: web sniffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2010-03-19 at 06:25 -0500, Jay Blanchard wrote:

> [snip]
> can any one give a complete sample script how to retrieve data content
> from web (jpg, pdf, field).
> [/snip]
> 
> Your question is a little too far reaching. You can use string functions
> match portions of strings including tried and true regular expressions.
> 
> What do you want to do, specifically?


I assume he wants to retrieve the files for a page as well.

I'd recommend having PHP call wget on the shell, as that tool was built
for this sort of thing.

If you don't have access to wget, then you could use some sort of DOM or
string manipulation to find out what files are used in a web page and
then make separate requests via cURL to grab those, as
file_get_contents() might not be totally reliable for this sort of
thing.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux