Jump to content

simple html dom question?


kevinkhan

Recommended Posts

Can somebody explain what these few lines mean??

 

 

$logInPage = file_get_html('https://login.facebook.com/login.php');



$qryString = '';
foreach($logInPage->find('form input[type=hidden]') as $hidden) {

    echo $hidden."<br />";
//	$qryString = $qryString.'&'.$hidden->name.'='.urlencode($hidden->value);

//	echo $qryString."<br />";
}

Link to comment
https://forums.phpfreaks.com/topic/203631-simple-html-dom-question/
Share on other sites

file_get_html() ; takes input argument url , it then loads the webpage identified by this url , as document object model and returns it ,

using find method it searches for hidden elements and return the result as an array of all the hidden elements found in the loaded dom , then you simply treat that as an array to iterate each single dom element (hidden) , the output will be

<input type="hidden" name="session" value="4343"/><input type="hidden" name="boi" value="4343fdf"/><input type="hidden" name="dfdf" value="4df343df"/>

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.