tags:

views:

75

answers:

1

Hi,

I'm new to php so I'm not sure why this is throwing an error. The class I'm working with asks for the following (I assume I should enter something in the blank areas):

  var $headers = array(
                    "User-Agent"=>"SkipJack 1.0",
                    "Referer"=>"",
                    "Host"=>"",
                    "Accept"=>"image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*",
                    );

The problem is, no matter what I enter there, or even if I leave it blank, I get an underfined $header variable error from this line:

exec("$this->curlPath $request $headers ".$this->ROOT_HOST.$this->URLS[$this->mode],$results,$return);

Can anyone help me figure out what's going on here? And what should I enter, if anything, between the quotes? I'm not sure if it's asking me for the url of the website or skipjack's...

TIA,

JK

+4  A: 

You have to access the object member via $this->header, not just $header.
Also the array variable will be replaced by the the string Array.

$a = array(1,2,3);
echo "... $a ...";

prints

... Array ...

and php has a curl module, you don't necessarily have to spawn another process for that.

VolkerK