views:

40

answers:

2

I would like to know what is the best way to pass a large amount of XML data from one PHP script to another.

I have a script that reads in an XML feed of jobs. I would like to have the script display a list of the job titles as links. When the user clicks a link they would be taken to another page displaying the details for that job.

The job details are too large to send in the query string, and it seems poor style to start a session for data that isn't specific to that user.

Any ideas?

+2  A: 

I would cache the feed in database and display the details from there. The chances are this will also improve page performance, as you can serve many users with the same cached data, which you can refresh after lets say 30 mins or whatever is suitable.

Sabeen Malik
You could look into caching services like memcached.
St. John Johnson
I hadn't thought about caching the entire feed. This is probably the best solution for me, as I would only need to refresh a couple times a day. Thanks!I looked at memcached before asking this question, but never having used it, I didn't feel comfortable with it for this project. I'll definitely check it out for next time.
Simple
A: 

If you don't want/can read the XML files again, all you can is store it (preferably, in parsed form) somewhere. See Native XML databases.

Artefacto