Re: [PHP] Multiple targets with fscanf

2003-08-02 Thread Denis 'Alpheus' Cahuk
Dan Anderson wrote: Thanks a lot. hehe no thanks needed. Just remember to read up on the functions so you'll know how they work. ;-) -Dan I've found some bugs there too, so dont worry. Like the ...($li_tag_start_position + 4), ($li_tag_end_position + 4)... It actually has to be (4 +

Re: [PHP] Multiple targets with fscanf

2003-08-02 Thread Dan Anderson
I've found some bugs there too, so dont worry. Like the lol...sorry but it was a quick reply... -dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Hello! I'll get strait to the point: I want to include a header from another site ($fp = fopen(www.something.info/news.html, r)) using the fscanf command, The headers are in li... tags and I'm usign $a = fscanf($fp, li%s). the problem is, that if I use this, I get only the first word in the

[PHP] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Hello! I'll get strait to the point: I want to include a header from another site ($fp = fopen(www.something.info/news.html, r)) using the fscanf command, The headers are in li... tags and I'm usign $a = fscanf($fp, li%s). the problem is, that if I use this, I get only the first word in the

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Marek Kilimajer
Try (untested) $a = fscanf($fp,li%sli); if that does not work use regular expresions Denis 'Alpheus' Cahuk wrote: Hello! I'll get strait to the point: I want to include a header from another site ($fp = fopen(www.something.info/news.html, r)) using the fscanf command, The headers are in li...

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Dan Anderson
Is there any reason you couldn't do something like: ?php $buffer = implode(\n,file($somesite)); while (strstr($buffer,li); { $li_tag_start_position = strpos($buffer,li); $li_tag_end_position = strpos($buffer,/li); $data = substr($buffer,(4 + $li_tag_start_position),(4 + $li_tag_end_position));

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Dan Anderson wrote: Is there any reason you couldn't do something like: ?php $buffer = implode(\n,file($somesite)); while (strstr($buffer,li); { $li_tag_start_position = strpos($buffer,li); $li_tag_end_position = strpos($buffer,/li); $data = substr($buffer,(4 + $li_tag_start_position),(4 +

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Dan Anderson
Thanks a lot. hehe no thanks needed. Just remember to read up on the functions so you'll know how they work. ;-) -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php