Jump to content

Recommended Posts

:confused:

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

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.

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.