Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2006-12-13 15:53
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($chCURLOPT_USERAGENT"Mozilla/2.0");
#curl_setopt($ch, CURLOPT_PROXY, "127.0.0.1:8118");
curl_setopt($chCURLOPT_HEADERtrue);
curl_setopt($chCURLOPT_POSTtrue);
curl_setopt($chCURLOPT_POSTFIELDS"test=1&test2=two");
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_REFERER"http://lazywebmastertools.com/blog");

echo 
curl_exec($ch);

curl_close($ch);

?>