Jump to content

logical way of doing this


turkman

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

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.