Jump to content

Using PHP to grab data from another webpage


adam_

Recommended Posts

Hi

I have a PHP driven CMS (self coded), for a group of users of a particular piece of software. The software writes information about the user (eg time logged in) etc to a website that is out of my control.

I want to be able to grab this data (which is displayed publically on a website) and put it into my MySql database once a week, as a cron job.

I can use cron and mysql fine, the issue is I have no idea how to go about grabbing data from another website.

I consider myself in the intermediate/semi-adavanced level with PHP, so a link to a tutorial would be great, i dont need the code making for me.

As the software is pre-release, i do not want to post it, or the website in question so the forum, but a generic response on the subject would be appreciated.

Thanks

Adam_
Just because data is publicly available does not mean it is legal to copy it. I will leave it to you to verify wether that site allows you to do that or not.

What you are wanting to do is called screen scraping. Do a search for "PHP .creen scraping". There are free classes you can download to do all the heavy lifting.

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.