turkman Posted May 1, 2011 Share Posted May 1, 2011 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; Quote Link to comment https://forums.phpfreaks.com/topic/235300-logical-way-of-doing-this/ Share on other sites More sharing options...
spiderwell Posted May 2, 2011 Share Posted May 2, 2011 surely its been blocked for a reason, and you should be working not trolling besides wouldnt a proxy site do the job for you? or they all blocked too? Quote Link to comment https://forums.phpfreaks.com/topic/235300-logical-way-of-doing-this/#findComment-1209257 Share on other sites More sharing options...
ignace Posted May 2, 2011 Share Posted May 2, 2011 ~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 Quote Link to comment https://forums.phpfreaks.com/topic/235300-logical-way-of-doing-this/#findComment-1209367 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.