php - find and replace html contents from remote iframe -
extract of captured iframe code remote host.
<div class="ad-title"> <span class="pointer" onclick="window.open('surfv.php?view=surfer&f=1&t=f97e5cec351c254254c290577e6a&p=78r254sfsv46s224&u=1','_blank');">link1 name</span> </div> <p class="adimg"><img src="http://domain.com/banner_7.png" style="max-height:50px; max-width:200px;;border:0px;"/></p> <div class="ad-content"> <table cellpadding="5" width="100%"><tr> <td valign="top"><span style="font-family: verdana, sans-serif; font-size:13px; ">add title</span></td> </tr> </table> </div>
earn $ 0.0005 i have captured remote iframe , read code.
$homepage = file_get_contents('http://remotehost.com/iframe.php'); echo $homepage; ?>
extract of code shown above
i want capture
surfv.php?view=surfer&f=1&t=f97e5cec351c254254c290577e6a&p=78r254sfsv46s224&u=1
link1 name $0.0005
from frame , put them in new table in following format. new link =`http://mywebsite.com/surfv.php?view=surfer&f=1&t=f97e5cec351c254254c290577e6a&p=78r254sfsv46s224&u=1
newlink title= link1 name price= $0.0005 --------------
thanks help`
<?php function gsb($string, $start, $end) { $string = " " . $string; $ini = strpos($string, $start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string, $end, $ini) - $ini; return substr($string, $ini, $len); } $homepage = file_get_contents('http://remotehost.com/iframe.php'); $link="http://mywebsite.com/".gsb($homepage,"window.open('","'"); echo $link;
Comments
Post a Comment