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!

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.