Jump to content

CLI - Automaclly getting stuff in HTML, split by class ids


tyteen4a03

Recommended Posts

I would like to automaclly get posts in a thread manually. Here's my design:

-Bot goes to topic, looking for posts

-He would search for a <a name="POSTIDHERE">, idenfity it and start the logging loop

-Firstly he searches for a field <span id="author"> and logs the content inside it

-Then he searches for a field <span id="content"> and logs the content of it

-Finally flush it into database (or do it when a step is completed)

-When all posts on the page are dealt, move to the next page

 

I don't have a problem with looping ATM, the place I am confused is the second step and the logging steps. How would I do them? In JavaScript there is something called getElementsById. I cannot find the same function in PHP.

 

Thanks!

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.