diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-10-01 07:40:32 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-10-01 07:40:32 +0000 |
commit | 9ff28a823702781f7e90cd44f31032a453827e7a (patch) | |
tree | bc29b74be5941b9910f433042c182829cc44aba2 /php | |
parent | e9aa07f660a3663281416fd5d391bcee78a117ec (diff) |
moved to separate module
Diffstat (limited to 'php')
-rw-r--r-- | php/Makefile.am | 2 | ||||
-rw-r--r-- | php/README | 15 | ||||
-rw-r--r-- | php/examples/Makefile.am | 2 | ||||
-rw-r--r-- | php/examples/README | 19 | ||||
-rw-r--r-- | php/examples/getbinarypageinvar.php | 25 | ||||
-rw-r--r-- | php/examples/getpageinvar.php | 12 | ||||
-rw-r--r-- | php/examples/simpleget.php | 14 | ||||
-rw-r--r-- | php/examples/simplepost.php | 14 |
8 files changed, 0 insertions, 103 deletions
diff --git a/php/Makefile.am b/php/Makefile.am deleted file mode 100644 index 22c751a70..000000000 --- a/php/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = examples -EXTRA_DIST = README diff --git a/php/README b/php/README deleted file mode 100644 index 86a888486..000000000 --- a/php/README +++ /dev/null @@ -1,15 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -PHP - -There's an excellent interface to curl written for PHP by Sterling Hughes. See -the subdirectory examples/ for some examples on how to program with it. - -Unfortunately, we don't have much more information about the interface -included here yet, but there's a detailed online manual for it over at: - - http://www.php.net/manual/ref.curl.php diff --git a/php/examples/Makefile.am b/php/examples/Makefile.am deleted file mode 100644 index 105a073ae..000000000 --- a/php/examples/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_DIST = README getpageinvar.php getbinarypageinvar.php simpleget.php \ - simplepost.php diff --git a/php/examples/README b/php/examples/README deleted file mode 100644 index 975908d2d..000000000 --- a/php/examples/README +++ /dev/null @@ -1,19 +0,0 @@ - _ _ ____ _ - ___| | | | _ \| | - / __| | | | |_) | | - | (__| |_| | _ <| |___ - \___|\___/|_| \_\_____| - -PHP program examples - -getbinarypageinvar.php - - Fetch a single URL containing binary data and return it into a variable - -getpageinvar.php - - Fetch a single URL and return in a variable - -simpleget.php - - A very simple example that gets a HTTP page - -simplepost.php - - Example that sends a HTTP POST to a remote site diff --git a/php/examples/getbinarypageinvar.php b/php/examples/getbinarypageinvar.php deleted file mode 100644 index 52e542c3d..000000000 --- a/php/examples/getbinarypageinvar.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -// Allocate a new cURL handle -$ch = curl_init("http://www.designmultimedia.com/intro.jpg"); -if (! $ch) { - die( "Cannot allocate a new PHP-CURL handle" ); -} - -// We'll be returning this transfer, and the data is binary -// so we don't want to NULL terminate -curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); -curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); - -// Grab the jpg and save the contents in the $data variable -$data = curl_exec($ch); - -// close the connection -curl_close($ch); - -// Set the header to type image/jpeg, since that's what we're -// displaying -header("Content-type: image/jpeg"); - -// Output the image -print( $data ); -?> diff --git a/php/examples/getpageinvar.php b/php/examples/getpageinvar.php deleted file mode 100644 index 9b45d9ef7..000000000 --- a/php/examples/getpageinvar.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -// -// The PHP curl module supports the received page to be returned in a variable -// if told. -// -$ch = curl_init(); - -curl_setopt($ch, CURLOPT_URL,"http://www.myurl.com/"); -curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); -$result=curl_exec ($ch); -curl_close ($ch); -?> diff --git a/php/examples/simpleget.php b/php/examples/simpleget.php deleted file mode 100644 index 0ae431315..000000000 --- a/php/examples/simpleget.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -// -// A very simple example that gets a HTTP page. -// - -$ch = curl_init(); - -curl_setopt ($ch, CURLOPT_URL, "http://www.zend.com/"); -curl_setopt ($ch, CURLOPT_HEADER, 0); - -curl_exec ($ch); - -curl_close ($ch); -?> diff --git a/php/examples/simplepost.php b/php/examples/simplepost.php deleted file mode 100644 index 1c29447ba..000000000 --- a/php/examples/simplepost.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php -// -// A very simple PHP example that sends a HTTP POST to a remote site -// - -$ch = curl_init(); - -curl_setopt($ch, CURLOPT_URL,"http://www.mysite.com/tester.phtml"); -curl_setopt($ch, CURLOPT_POST, 1); -curl_setopt($ch, CURLOPT_POSTFIELDS, "postvar1=value1&postvar2=value2&postvar3=value3"); - -curl_exec ($ch); -curl_close ($ch); -?> |