quantumdecipher Posted July 8, 2011 Share Posted July 8, 2011 Hi guys, I am trying to do a script which fetches the source code of a webpage, say : http://www.abc.com/shop.html, then looks for an element in the source code, say BO_TRAN in the following: tr align=left bgcolor="#F5F5DC"> <td valign=top colspan=1><font face="verdana, arial, helvetica" size="-2">BO_TRAN</font> </td> <td valign=top colspan=1><font face="verdana, arial, helvetica" size="-2">Loader</font> </td> <td valign=top colspan=1><font face="verdana, arial, helvetica" size="-2">n/a</font> </td> <td valign=top colspan=1><font face="verdana, arial, helvetica" size="-2">Batchprocess</font> </td> <td valign=top colspan=1><font face="verdana, arial, helvetica" size="-2">n/a</font> </td> <td style=white-space:nowrap colspan=1><font face="verdana, arial, helvetica" size="-2">2011-05-12 08:43:57 SGT</font> </td> </tr> then returns the value of the date as a variable. Link to comment https://forums.phpfreaks.com/topic/241386-find-tag-name-after-finding-a-string/ Share on other sites More sharing options...
Adam Posted July 8, 2011 Share Posted July 8, 2011 Wonderful..? Link to comment https://forums.phpfreaks.com/topic/241386-find-tag-name-after-finding-a-string/#findComment-1239979 Share on other sites More sharing options...
quantumdecipher Posted July 10, 2011 Author Share Posted July 10, 2011 Any ideas? Link to comment https://forums.phpfreaks.com/topic/241386-find-tag-name-after-finding-a-string/#findComment-1240760 Share on other sites More sharing options...
Adam Posted July 10, 2011 Share Posted July 10, 2011 What's your question? Link to comment https://forums.phpfreaks.com/topic/241386-find-tag-name-after-finding-a-string/#findComment-1240817 Share on other sites More sharing options...
quantumdecipher Posted July 11, 2011 Author Share Posted July 11, 2011 How to fetch the date in the code i posted after the BO_TRAN String Basically I need to get this part: <td style=white-space:nowrap colspan=1><font face="verdana, arial, helvetica" size="-2">2011-05-12 08:43:57 SGT</font> and store the date (2011-05-12 08:43:57 SGT) into a variable. So basically, I need to find the tag where the innerHTML BO_TRAN is located and then store the date from below it to a variable. Link to comment https://forums.phpfreaks.com/topic/241386-find-tag-name-after-finding-a-string/#findComment-1241075 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.