0

I have a simple php scrape that I have managed to set up that grabs the title and image off a page

$post=$_POST['post'];

$html = file_get_html($post);
$title = $html->find('h2', 1);
$imageurl = $html->find('img', 1); 

echo $title->plaintext."<br>\n";
echo $imageurl->src;

But Im also trying to grab the video embed code, that uses an iframe like this

 <input type="text" name="media_embed_code" id="mediaEmbedCodeInput" size="110" onclick="this.focus();this.select();" value="&lt;iframe src=&quot;http://drunksportsfans.com/embedframe/537&quot; frameborder=0 width=510 height=400 scrolling=no&gt;&lt;/iframe&gt;">

I just need the value part, but its clearly more complicated than the title and image

1 Answer 1

1

This is simple enough:

$value_of_input = $html->find('input[name=media_embed_code]', 0)->value;

Sign up to request clarification or add additional context in comments.

1 Comment

Glad to know, vote the answer as accepted if it fixed your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.