Jump to content

Using PHP to grab data from another webpage


Recommended Posts


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.


Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.