Login   Register  
PHP Classes
elePHPant
Icontem

File: remoteform.example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jon Gjengset  >  Remote Form  >  remoteform.example.php  >  Download  
File: remoteform.example.php
Role: Example script
Content type: text/plain
Description: Example file
Class: Remote Form
Retrieve HTML forms input values
Author: By
Last change:
Date: 2009-06-16 06:16
Size: 377 bytes
 

Contents

Class file image Download
<?php
  $site 
file_get_contents('http://www.gmail.com');
  
$dom = new DOMDocument();
  
$dom->loadHTML($site);
  
$xpath = new DOMXpath($dom);
  
$form = new RemoteForm($xpath->query('//form[@name="gaia_loginform"]')->item(0));
  
$form->setAttributeByName('Email''me@gmail.com');
  
$form->setAttributeByName('Passwd''mypass');
  
var_dump($form->getParameters());
?>