PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Justin   MyCurl   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example usage
Class: MyCurl
Pure PHP implementation of the cURL library
Author: By
Last change:
Date: 18 years ago
Size: 644 bytes
 

Contents

Class file image Download
<?php
/*
 * Example usage for MyCurl
 *
 * Documentation is still pending for this library because it
 * is still in alpha.
 *
 */

include("mycurl.class.php");

$ch = curl_init("http://lazywebmastertools.com");

curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/2.0");
#curl_setopt($ch, CURLOPT_PROXY, "127.0.0.1:8118");
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "test=1&test2=two");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_REFERER, "http://lazywebmastertools.com/blog");

echo
curl_exec($ch);

curl_close($ch);

?>