php - Error 500 with large arrays -
i'm attempting read xml file on separate domain. xml file has around 250 <entries> , 1 of children using namespace. child string of geo coordinates (latitude , longitude longitude separated space). in of these entries there can 15,000 separate items.
my issue when attempt pass information server client using json server spits out error 500. what's interesting script works fine on localhost running xampp.
i cannot use ajax retrieve , parse information due access-control-allow-origin. prefer use ajax if possible, couldn't figure out.
script:
if ($xml = simplexml_load_file("http://www.dot.nd.gov/travel-info-v2/georss/loadrestrict-current.xml")) { $ns = $xml->getnamespaces(true); $return = array(); foreach ($xml->entry $value) { $value->geo = $value->children($ns["georss"]); $return[] = $value; } echo json_encode($return); }
Comments
Post a Comment