PHP Classes

PHP 4

Recommend this page to a friend!

      Simple CURL Wrapper  >  All threads  >  PHP 4  >  (Un) Subscribe thread alerts  
Subject:PHP 4
Summary:Class works in PHP 4 with a few changes.
Messages:2
Author:Robert A. Stuckart
Date:2006-11-30 17:22:48
Update:2007-09-26 14:36:43
 

  1. PHP 4   Reply   Report abuse  
Picture of Robert A. Stuckart Robert A. Stuckart - 2006-11-30 17:22:48
I got this class working on my PC (Windows XP Pro, Apache) by changing the class variables to "var". May I suggest providing a separate PHP 4 version of the class.

In addition, if you provide a sample HTML (or PHP) file, the example will probably work the first time.

Thank you for providing this class. It can save a lot of time.

  2. Re: PHP 4   Reply   Report abuse  
Picture of Bart Goossens Bart Goossens - 2007-09-26 14:36:43 - In reply to message 1 from Robert A. Stuckart
This how the class needs to be modified
class MyCurl
{

var $getHeaders = true ; //headers will be added to output
var $getContent = true; //contens will be added to output
var $followRedirects = true; //should the class go to another URL, if the current is "HTTP/1.1 302 Moved Temporarily"

var $fCookieFile;
var $fSocket;

function MyCurl()
{
$this->fCookieFile = tempnam("/tmp", "g_");
}

Class is not compatible below php 5 whitout these modifications !!!