Re: [PHP] WHILE LOOP PROBLEM
On Fri, 2009-03-27 at 08:11 +, Andrew Williams wrote: > can some tell why the below loop stop running after some time. > > $start=10; > const run=0; > while($start >run){ > > //do somthing > > } > max_execution_time -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RSS feeder in PHP5?
On Mon, 2009-01-12 at 11:02 +, Richard Heyes wrote: > > Is there something in PHP5 which can generate the RSS feed? > > You don't need an extension to help you generate an XML feed. You > dimply output XML data instead of HTML and send an appropriate content > type header, eg: > > header('Content-Type: text/xml'); > You actually mean application/xml not text/xml And its alot better to use DOMDocument in PHP5 for XML Creation rather than hardcode everything. Thanks > And the actual data: > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 DOM Problem
Hi there. I don't kno id this is the correct place to post but... I am using the PHP5 DOM to make up RSS Feeds .. A Problem I have is I want to make this up for itunes.. http://www.itunes.com/dtds/podcast-1.0.dtd";> etc.. I use.. $p_dom = new DOMDocument('1.0','UTF-8'); $p_rss = $p_dom->createElement('rss'); $p_rss->setAttribute('version', '2.00'); $p_rss->setAttribute('xmlns:itunes','http://www.itunes.com/dtds/podcast-1.0.dtd'); $p_dom->appendChild($p_rss); which is working for me.. Debian (PHP 5.2.6-2+b1) but doesn't work on some other people with other versions of php5 ( I don't know yet which version they have) they only get So the name space is missing.. So I looked up http://nz2.php.net/manual/en/domelement.setattribute.php and it says the "correct" way is to use createElementNS.. but I have tried and tried and I cannot get it to make up what I want it to do. can someone help? I also want to make something like http://search.yahoo.com/mrss/"; xmlns:dcterms="http://purl.org/dc/terms/"; xmlns:gm="http://www.google.com/schemas/gm/1.1"; xmlns:av="http://www.searchvideo.com/schemas/av/1.0"; xmlns:dc="http://purl.org/dc/elements/1.1/";> for mediarss feeds + other types . but I can't seem to be able to use CreateElementNS to make this up either Can someone help?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php