I have a problem while parsing an XML File of 1986 lines .. it gives me execution timeout!!
here is my code:
$XML_File = simplexml_load_file("EXTERNAL URL");
$projects = $XML_File->channel->item;
$i = 0;
while($projects)
{
$title = $projects[$i]->title;
$link = $projects[$i]->link;
$description = $projects[$i]->description;
$category = $projects[$i]->category;
$i++;
}
When I run it, it times out after 30 secs, without returning any result!!
When I changed the while to a for loop .. with a max of 4 it worked fine .. Is there a way to parse a big file?? Or shall I move to creating a desktop application??
I don’t think this is ever going to finish. You’re just checking to see if
$projectsexists.Maybe something like this will work: