Re: [PHP] simpleXML - simplexml_load_file() timeout? [Resolved]

2006-04-11 Thread darren kirby
else { $lfd = fopen($cache_version, 'w'); fwrite($lfd, $data); fclose($lfd); $xml = simplexml_load_string($data); } print "\n"; foreach ($xml->channel->item as $item) { $cleaned = str_replace("&", "&a

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
I do get something figured out I will post results here. Problem is, with either method I need to find a feed that is slow to test with. If I test it with a bunk url it will just 404 immediately right? Is there a way to simulate a slow connection? > -- > Like Music? > http://l-i-e.c

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
esponse, As Robert Cummings suggested above, the easy solution is to use curl, which does offer a timeout option, and then feed it to simplexml_load_string(). I am writing some code now... Thanks, and have a good one, -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org &q

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
quoth the Robert Cummings: > On Mon, 2006-04-10 at 17:46, darren kirby wrote: > > quoth the Robert Cummings: > > > Why do you do this on every request? Why not have a cron job retrieve > > > an update every 20 minutes or whatnot and stuff it into a database > >

Re: [PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
imes when the page with my feeds goes for a few hours without a request. Of course, this still wouldn't solve my original problem. > Cheers, > Rob. > -- Thanks for your insight, -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of

[PHP] simpleXML - simplexml_load_file() timeout?

2006-04-10 Thread darren kirby
p;", $item->link); print "$item->title\n"; } print "\n"; } PHP 5.1.2 on Linux. thanks, -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected.

Re: [PHP] Timestamp needed in error log

2006-04-08 Thread darren kirby
ou have your "error_log" set to /some/random/file and you do not see a timestamp then I think it is safe to conclude that PHP does not provide this facility itself. So, if you need the timestamp you might need to use Apache's or syslog's logging facilities instead. HTH By the

Re: [PHP] Timestamp needed in error log

2006-04-08 Thread darren kirby
or log, which provides its own timestamp. Another option is to log to the system logs: error_log = syslog # in php.ini and use your loggers filter facilities to keep the php messages in a separate file. Again, here syslog will provide its own timestamp. -d -- darren kirby :: Part of the problem si

Re: [PHP] 404 ErrorDocument in safe mode

2005-10-13 Thread darren kirby
everything > gone OK. Have anyone idea to fix this. Sorry for my English. > > -- > Kody First thing to check is that your server has permissions to read the script, as there seems to be a permissions problem here. More details about your server setup might help to diagnose this further.

Re: [PHP] E-Mail

2005-09-18 Thread darren kirby
lso need software to actually transport the mail. -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 pgpvlZiWL0lEE.pgp Description: PGP signature

Re: [PHP] While and echoing HTML

2005-05-10 Thread darren kirby
k here. Why the '$product_type"; > } > $i++ As the error message is trying to tell you, php statements are terminated with semi-colons: $i++; > ?> > > > > > I get the folowing error, > > *Parse error*: parse error, unexpected '}', expecting

Re: [PHP] Re: php/mysql url validation methods...

2005-02-14 Thread darren kirby
quoth the Jason Barnett: > Darren Kirby wrote: > > The problem is that after playing around with this a bit, it is clear > > that someone can craft a url with an arbitrary $postid that is not in the > > database yet. Now naively, it would seem that the worst someone could

[PHP] php/mysql url validation methods...

2005-02-13 Thread darren kirby
t? If you need more info, please just ask... Thanks, Darren Kirby -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 pgpuX2cdA4ReJ.pgp Description: PGP signature

Re: [PHP] Server Uptime

2005-02-07 Thread darren kirby
is put a static binary of 'uptime' into safe_mode_exec_dir (specified in php.ini) and use an exec call to get the info... -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..."