PHP Explode: How to Download and Split a Specific HTML Part?

Posted by elmaso on Stack Overflow See other posts from Stack Overflow or by elmaso
Published on 2010-04-01T20:49:37Z Indexed on 2010/04/01 20:53 UTC
Read the original article Hit count: 366

Filed under:
|

Hello,

example: at this domain http://www.example.com/234234/go.html is only one iframe-code

how can i get the url in the iframe-code?

go.html:

<iframe style="width: 99%;height:80%;margin:0 auto;border:1px solid grey;" src="i want this url" scrolling="auto" id="iframe_content"></iframe>

i have this snippet, but its very bad coded..

function downloadlink ($d_id)
  {
    $res = @get_url ('' . 'http://www.example.com/' . $d_id . '/go.html');
    $re = explode ('<iframe', $res);
    $re = explode ('src="', $re[1]);
    $re = explode ('"', $re[1]);
    $url = $re[0];
    return $url;
  } 

thank you!

© Stack Overflow or respective owner

Related posts about php

Related posts about explode