PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Er. Rochak Chauhan   PHP Form Test   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example File
Class: PHP Form Test
Submit forms to retrieve responses
Author: By
Last change:
Date: 9 years ago
Size: 485 bytes
 

Contents

Class file image Download
<?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;
?>