note 102974 added to function.simplexml-load-file

From: Date: Thu, 17 Mar 2011 18:59:04 +0000
Subject: note 102974 added to function.simplexml-load-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-177964@lists.php.net to get a copy of this message
If you find that you are receiving 500 errors with simplexml_load_file() but you can access the xml/rss feed manually through a browser, your script is probably being blocked by a user agent sniffer. Add this code before your xml call to remedy this issue <?php ini_set("user_agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); ini_set("max_execution_time", 0); ini_set("memory_limit", "10000M"); $rss = simplexml_load_file($feed_url); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 12.91.245.190 ---- Manual Page -- http://www.php.net/manual/en/function.simplexml-load-file.php Edit -- https://master.php.net/note/edit/102974 Del: integrated -- https://master.php.net/note/delete/102974/integrated Del: useless -- https://master.php.net/note/delete/102974/useless Del: bad code -- https://master.php.net/note/delete/102974/bad+code Del: spam -- https://master.php.net/note/delete/102974/spam Del: non-english -- https://master.php.net/note/delete/102974/non-english Del: in docs -- https://master.php.net/note/delete/102974/in+docs Del: other reasons-- https://master.php.net/note/delete/102974 Reject -- https://master.php.net/note/reject/102974 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#177964) next »