lopband
asked on
PHP Regex to get link and size...
Hello!
I need to open a html page and read the file, then i need to extract two things from _many_ blocks that look like this:
<tr class="text">
<td><a href="http://media4.something.com/DPliana/something/midband/DPliana_4.mp4">Download</a></td>
<td align="left"><span class="text">something here</span></td>
<td align="center">82 MB</td>
</tr>
I *only* want the links that have the text "Download", note that there are plenty of other links on the page both with the text 'Download' and without. Lastly i need the filesize which will always be in the same _place_ as above.
So the above should give me an array:
someArray ( [link1] => "http://media4.something.com/DPliana/something/midband/DPliana_4.mp4" [size1] => "82 MB")
I need to open a html page and read the file, then i need to extract two things from _many_ blocks that look like this:
<tr class="text">
<td><a href="http://media4.something.com/DPliana/something/midband/DPliana_4.mp4">Download</a></td>
<td align="left"><span class="text">something here</span></td>
<td align="center">82 MB</td>
</tr>
I *only* want the links that have the text "Download", note that there are plenty of other links on the page both with the text 'Download' and without. Lastly i need the filesize which will always be in the same _place_ as above.
So the above should give me an array:
someArray ( [link1] => "http://media4.something.com/DPliana/something/midband/DPliana_4.mp4" [size1] => "82 MB")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, it seems to be working exactly as planned so i'll give you the pts.. cheers!
ASKER
thanks!
ASKER
if nobody else posts i'll give you the points.
Thanks!