Perry, If you have not done already, please go through the Gadget API documentation, especially this section which discuss about working with remote content: http://code.google.com/apis/gadgets/docs/legacy/remote-content.html
The _IG_Fetch*() function family will allow you to get the remote data in your gadget, while specifying how long the data caching should be. If you do not want any caching at all, you could change your gadget to use the url type. The gadget content would be your php script output rendered directly by the browser in your gadget iframe: http://code.google.com/apis/gadgets/docs/legacy/fundamentals.html#Content_Type Jerome On Jan 20, 3:49 pm, Perry <[email protected]> wrote: > Hi Dan, > > Thanks for the prompt and helpful response. Even though it is > generally just me that uses the gadget (& a couple of dozen blog > readers of course), the second option seems to me to be the most > elegant. It would also help with another more important project I'm > working on. > > Can you point me in the direction of some example code I can learn > from? > > Thanks > > On Jan 21, 6:55 am, "Dan (Google Employee)" <[email protected]> > wrote: > > > Hi Perry, > > > If you're just using the gadget yourself you can disable caching on > > the gadget for your page with the developer gadget (add developer.xml > > on the directory page). If you want a solution that works for more > > than one user, I'd suggest modifying your gadget so that it performs a > > request to your PHP script for the weather data rather than having the > > PHP script generate the gadget. This way the XML remains constant and > > only the data feed is cached (which should update once every hour or > > so by default). > > > Best, > > Dan > > > On Jan 19, 7:07 pm, Perry <[email protected]> wrote: > > > > Hi Folks, > > > > I'm a newcomer to gadget writing, in fact this is, apart from the > > > inevitable 'hello world' my first attempt. > > > > I have a gadget that reports on current weather at home. It's a simple > > > PHP file that reads in a text file and outputs the XML for the gadget. > > > > I use the gadget on my iGoogle homepage and on my Blogger site. On the > > > Blogger page it works perfectly, bang up to date. On the iGoogle page > > > however in only seems to update once per day. > > > > So, for example, it's currently nearly 13:30. On the blogger page the > > > gadget shows 13:20 (the text file is updated every 10 minutes so > > > that's the most recent one) whereas the same gadget on the iGoogle > > > page shows the status (regardless of reloads, refreshes and using > > > different browsers) at 06:40 this morning and will continue to show > > > 06:40 all day. > > > > Is there something I have to do that's different for iGoogle to > > > Blogger to get it to update? > > > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "iGoogle Developer Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Gadgets-API?hl=en -~----------~----~----~----~------~----~------~--~---
