Re: [PHP] web sniffer

2010-03-22 Thread Auke van Slooten
Jochen Schultz wrote: Btw., when you use file_get_contets, is there a good way to tell the script to stop recieving the file after let's say 2 seconds - just in case the server is not reachable - to avoid using fsockopen? http://nl.php.net/manual/en/context.http.php specifically: timeout flo

Re: [PHP] web sniffer

2010-03-19 Thread Rene Veerman
"field"? On Fri, Mar 19, 2010 at 9:46 AM, madunix wrote: > can any one give a complete sample script how to retrieve data content > from web (jpg, pdf, field). > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] web sniffer

2010-03-19 Thread Jochen Schultz
Thanks alot! regards Jochen Peter Lind schrieb: You should be able to do that by setting context options: http://www.php.net/manual/en/context.http.php On 19 March 2010 08:53, Jochen Schultz wrote: Btw., when you use file_get_contets, is there a good way to tell the script to stop recieving

Re: [PHP] web sniffer

2010-03-19 Thread Jochen Schultz
Maybe this code may help you getting into it? public function sendHttpRequest($host,$filename,$port=80,$timeout=1,$x=0,$result=array()) { $header = 'GET /'.$filename.' HTTP/1.1'.PHP_EOL; $header .= 'Host: '.$host.PHP_EOL; $header .= 'Connection: close'.PHP_EOL; $header .= 'Us

RE: [PHP] web sniffer

2010-03-19 Thread Ashley Sheridan
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 trie

RE: [PHP] web sniffer

2010-03-19 Thread Jay Blanchard
[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?

Re: [PHP] web sniffer

2010-03-19 Thread madunix
can any one give a complete sample script how to retrieve data content from web (jpg, pdf, field). Thanks On Fri, Mar 19, 2010 at 9:53 AM, Jochen Schultz wrote: > Btw., when you use file_get_contets, is there a good way to tell the script > to stop recieving the file after let's say 2 seconds -

Re: [PHP] web sniffer

2010-03-19 Thread Peter Lind
You should be able to do that by setting context options: http://www.php.net/manual/en/context.http.php On 19 March 2010 08:53, Jochen Schultz wrote: > Btw., when you use file_get_contets, is there a good way to tell the script > to stop recieving the file after let's say 2 seconds - just in case

Re: [PHP] web sniffer

2010-03-19 Thread Jochen Schultz
Btw., when you use file_get_contets, is there a good way to tell the script to stop recieving the file after let's say 2 seconds - just in case the server is not reachable - to avoid using fsockopen? regards Jochen madunix schrieb: okay ..it works now i use http://www.my.com";); echo $data; ?

Re: [PHP] web sniffer

2010-03-18 Thread madunix
okay ..it works now i use http://www.my.com";); echo $data; ?> On Fri, Mar 19, 2010 at 12:32 AM, Adam Richardson wrote: > On Thu, Mar 18, 2010 at 6:08 PM, Ashley Sheridan > wrote: >> >> On Fri, 2010-03-19 at 00:11 +0200, madunix wrote: >> > trying http://us3.php.net/manual/en/function.fsockopen.

Re: [PHP] web sniffer

2010-03-18 Thread Adam Richardson
On Thu, Mar 18, 2010 at 6:08 PM, Ashley Sheridan wrote: > On Fri, 2010-03-19 at 00:11 +0200, madunix wrote: > > trying http://us3.php.net/manual/en/function.fsockopen.php > > do you a piece of code that read parts pages. > > > > > > On Fri, Mar 19, 2010 at 12:00 AM, Ashley Sheridan > > wrote: >

Re: [PHP] web sniffer

2010-03-18 Thread Ashley Sheridan
On Fri, 2010-03-19 at 00:11 +0200, madunix wrote: > trying http://us3.php.net/manual/en/function.fsockopen.php > do you a piece of code that read parts pages. > > > On Fri, Mar 19, 2010 at 12:00 AM, Ashley Sheridan > wrote: > > > On Fri, 2010-03-19 at 00:03 +0200, madunix wro

Re: [PHP] web sniffer

2010-03-18 Thread madunix
trying http://us3.php.net/manual/en/function.fsockopen.php do you a piece of code that read parts pages. On Fri, Mar 19, 2010 at 12:00 AM, Ashley Sheridan wrote: > On Fri, 2010-03-19 at 00:03 +0200, madunix wrote: > > I've been trying to read the contents from a particular URL into a > string

Re: [PHP] web sniffer

2010-03-18 Thread Adam Richardson
On Thu, Mar 18, 2010 at 6:03 PM, madunix wrote: > I've been trying to read the contents from a particular URL into a > string in PHP, and can't get it to work. any help. > > Thanks > > -- > If there is a way, I will find one...*** > If there is none, I will make one..."*** > mad

Re: [PHP] web sniffer

2010-03-18 Thread Ashley Sheridan
On Fri, 2010-03-19 at 00:03 +0200, madunix wrote: > I've been trying to read the contents from a particular URL into a > string in PHP, and can't get it to work. any help. > > Thanks > > -- > If there is a way, I will find one...*** > If there is none, I will make one..."*** >

[PHP] web sniffer

2010-03-18 Thread madunix
I've been trying to read the contents from a particular URL into a string in PHP, and can't get it to work. any help. Thanks -- If there is a way, I will find one...*** If there is none, I will make one..."*** madunix ** -- PHP General Mailing List (http://ww