Jump to content

Scraping from tag id's in php?


sdchakqj10

Recommended Posts

I have never done this before, am quite new to php, but pick up fast.

 

I want to, using a php file, load an html page, scrape some content from different tags with certain IDs and load the content into variables in the php file.  Do i need to use javascript for this?  Is there a topic where this has been answered already?  I've searched the forum and found nothing.  Please help.

Link to comment
Share on other sites

There are two parts to this. The first it grabbing the content. Hopefully it'll be a simple matter of using the file_get_contents() function. Then, you'll need to be using regular expressions to find your matches. There is a subforum here which might help you.

 

Otherwise, come back with some sample data that you've managed to grab, and tell us what you're trying to retrieve.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

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