Jump to content

Collect periodic data from a site


empireoflight

Recommended Posts

Hi, first time visitor here! Hope I can get some help, and maybe help out too.

I'm trying to collect data from a site that changes periodically. I want a script that will get a number from the url and store it to be used in an app I will build. The number I want to get is the wait time in minutes for  popular local restaurants. The structure of the html on the site is like:

<tr>
<td>Four Seasons</td>
<td>DiCaprio's</td>
</tr>
<tr>
<td>
<img src='/images/down.png'>18 min</td>
<td>
<img src='/images/up.png'>27 min</td>
</tr>

etc. The down.png and up.png files indicate whether the time has gone up or down since the last check. I could use that too, I guess, but I really don't need it since the script will show whether the time is up or down. I'm not sure exactly how often the site is updated, but I figure a check every 10 minutes or so would suffice.

Any help in writing a script to do this (and store in a db or txt file) would be awesome. Thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/280902-collect-periodic-data-from-a-site/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.