Jump to content

Recommended Posts

I made a bot, that scrapes content from a forum, i cant access the forum in work, so am trying to make something discreat to read it on my own site while at work. Anyway the links to threads are something like this.

 

I got help and i know how to extract the unique thread number using regex. However i have a problem. What i really need, now that i think about it, is a way of getting the thread number and the thread title (so i can make sense of what im reading.) The thread title is in the setWindowStatus function.  I cant think of a way to do it. I dont even know if it would work in an array what id basically like is something that says

 

1) Thread title - Thread id

2) Thread title - Thread id

 

etc

 

that is stored in a way that i can easily manipulate.

 

<img src="http://s2.images.proboards.com/xx.gif" alt=" " border="0"/></font></td><td class="windowbg" bgcolor="FFFFFF" width="48%" style="cursor:pointer;" onClick="if(!pb_bubble)location.href='/index.cgi?board=general&action=display&thread=13483';" onMouseOver="mouseOverHighlightCell(this);setWindowStatus('Lurkers, show your face ');return true;

Link to comment
https://forums.phpfreaks.com/topic/235300-logical-way-of-doing-this/
Share on other sites

~setWindowStatus\('(.*)'\)~

 

Will give you the text between the parentheses. If you are using SimpleXML you would do something like:

 

preg_match('~setWindowStatus\('(.*)'\)~', $e->attributes()->onmouseover, $matches); // [1] => Lurkers, show your face

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.