PHP Classes

File: Example.php

Recommend this page to a friend!
  Classes of Peter   Curl Class   Example.php   Download  
File: Example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Curl Class
Send HTTP GET and POST requests using Curl
Author: By
Last change:
Date: 10 years ago
Size: 327 bytes
 

Contents

Class file image Download
<?php
//POST
$curl = new CURL();
$curl->method('POST');
$result = $curl->query('', array('a' => 'Carmen', 'b' => 'Joe', 'c' => 'Peter'));
var_dump($result);

//GET
$curl->method('GET');
$result = $curl->query('', array('a' => 'Carmen', 'b' => 'Joe', 'c' => 'Peter'));
var_dump($result);

var_dump($_GET);
var_dump($_POST);
?>