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
https://forums.phpfreaks.com/topic/80126-scraping-from-tag-ids-in-php/
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.

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.