Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
phpQuery Example
//Get the HTML string from cURL
//Create new instance of phpQuery
//We assume the phpoQuery library is included at the top or your script.
$inputs = array(); //Create an empty array to hold the inputs.
//Get all the inputs on the page and put them in an array.
foreach(pq(':input') as $id => $block) {
$inputs[pq($block)->attr('name')] = pq($block)->attr('value');
//Post those inputs back to the login form.
// Make sure to overwrite the blank username/password fields in that array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.