/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Update a XML file using PHP without loading it

I have a XML file that has to be updated daily with a PHP file.
How can I make the PHP file automatically load at a certain time during each day?

Would it be possible to use PHP in XML files? That would be a possible workaround.

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@narutodude000authorAug 20.2010 — I fixed it using the "bad" method: by using a 1x1 iframe with the php file that generates the XML file in it.
Copy linkTweet thisAlerts:
@pollockAug 20.2010 — I have a XML file that has to be updated daily with a PHP file.

How can I make the PHP file automatically load at a certain time during each day?

Would it be possible to use PHP in XML files? That would be a possible workaround.[/QUOTE]


Yes, It would be possible to use php in xml files. But If you will use php5 for Auto loading Classes Feature to Automatically Include PHP Files. Auto load is a new attribute introduced in PHP5.
Copy linkTweet thisAlerts:
@criterion9Aug 20.2010 — I fixed it using the "bad" method: by using a 1x1 iframe with the php file that generates the XML file in it.[/QUOTE]

You could just use a simple include rather than messing about client side. As long as the PHP that writes the xml doesn't have any "echo" statements then nothing will be sent client side.
Copy linkTweet thisAlerts:
@narutodude000authorAug 20.2010 — How do I use includes in XML?
Copy linkTweet thisAlerts:
@criterion9Aug 20.2010 — Not within an xml file. Within your php file that is loading the iframe. Best to keep it server-side when practical.
Copy linkTweet thisAlerts:
@narutodude000authorAug 20.2010 — I forgot to mention that I'm using the XML file for a Google Gadget. Any idea as to how to use PHP in it?
Copy linkTweet thisAlerts:
@criterion9Aug 20.2010 — You can't "use php in it" inside an xml file (without making a big change on your server that could cause a lot more CPU/RAM usage when working with xml files). I was suggesting calling your xml creation file using an include rather than an iframe. As another option you could direct the application to a php script that outputs xml (depending on your aims this may or may not be possible).
×

Success!

Help @narutodude000 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...