PHP Classes

PHP Form Test: Submit forms to retrieve responses

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 138 All time: 9,244 This week: 673Up
Version License PHP version Categories
php-form-test 1.0Free For Educatio...3.0HTTP, PHP 5
Description 

Author

This class can submit forms to retrieve responses.

It takes the URL of remote site form and a list of form parameters and submits a HTTP request to site Web server to submit the form.

The class submit the form either via HTTP GET and POST methods.

Picture of Er. Rochak Chauhan
  Performance   Level  
Innovation award
Innovation award
Nominee: 15x

Winner: 4x

 

Example

<?php
require("PHP_CSRF_Test.inc.php");

// Test for wordpress admin panel
$formAction="DOMAIN_NAME/wp-login.php";

$formElements=array();
$formElements['log']="admin";
$formElements['pwd']="admin";
$formElements['rememberme']="forever";
$formElements['wp-submit']="Log In";
$formElements['redirect_to']=$formAction;
$formElements['testcookie']="0";

$obj = new PHP_CSRF_Test($formAction, $formElements);
$response = $obj->postFormViaPostMethod();

echo
$response;
?>


  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file example.php Example Example File
Plain text file PHP_CSRF_Test.inc.php Class Main Class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:138
This week:0
All time:9,244
This week:673Up