cURL / Mailing Lists / curl-and-php / Single Mail


Error setting user id and password in curl

From: Michael Horowitz <>
Date: Sun, 16 Mar 2008 14:32:06 -0400

How should I properly be setting the user id and password?
Parse error*: syntax error, unexpected ':' in xxx\xxx\xx on line *120*

line 120 is

curl_setopt($ch, CURLOPT_USERPWD, $this->$user:$this->$password);

I've tested this and received the same error hard coding a user ID and

It appears to be correct

curl::option CurlHandle,"USERPWD","verhas:m23kkdUT"

Pass a string as parameter, which should be username:password to use for
the connection. If the password is left out, you will be prompted for it.

Michael Horowitz
Your Computer Consultant

Received on 2008-03-16