[Q] Automatic (i.e., scheduled) access to another web page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael T. Peterson

    [Q] Automatic (i.e., scheduled) access to another web page

    Hi again,

    I need to be able update my web site with info from a remote web site. At
    this other web site, the info I require is updated every 30 minutes, 24
    hours per day. Life would be cool if a way existed by which I could
    "schedule" my code to run periodically so that my info could remain
    [reasonably] synchronized with the info on this other site.

    In the PHP docs / books I have I've been unable to find functions / services
    / examples that might permit me to implement this functionality. Do [php]
    services/classes exist that would meet this need? Do I need to invoke the
    services of my WEB server (apache on both ends)?

    Any suggestions would be greatly appreciated.

    Michael


  • Chris Jenkinson

    #2
    Re: [Q] Automatic (i.e., scheduled) access to another web page

    Michael T. Peterson wrote:
    [color=blue]
    > Hi again,
    >
    > I need to be able update my web site with info from a remote web site. At
    > this other web site, the info I require is updated every 30 minutes, 24
    > hours per day. Life would be cool if a way existed by which I could
    > "schedule" my code to run periodically so that my info could remain
    > [reasonably] synchronized with the info on this other site.
    >[/color]

    You should write a cron script (look on Google for some tutorials) which
    starts a PHP script to do what you want to happen. The PHP script will
    grab the info you want, and the cron script will make it run every 1/2 hour.

    Chris

    --
    Chris Jenkinson

    Comment

    • Daniel Tryba

      #3
      Re: [Q] Automatic (i.e., scheduled) access to another web page

      Michael T. Peterson <mtp1032@comcas t.net> wrote:[color=blue]
      > I need to be able update my web site with info from a remote web site. At
      > this other web site, the info I require is updated every 30 minutes, 24
      > hours per day. Life would be cool if a way existed by which I could
      > "schedule" my code to run periodically so that my info could remain
      > [reasonably] synchronized with the info on this other site.[/color]

      Scheduling isn't provided by PHP, but it can be by tools on the
      webserver (or any other machine requesting the update page regularly).

      But there is no need to update every 30 minutes, you only need to update
      if you cached version is requested and the cached data is more than 30
      minutes old. The only problem is multiple requests on an update, but
      htat is what flock(ing) is for...

      --

      Daniel Tryba

      Comment

      Working...