$string = "level=2&pass=pwd&form-id=user_login&op=Log in"; $string_length= length($string); $curl->setopt( CURLOPT_POSTFIELDS, "$string" ); $curl->setopt( CURLOPT_POSTFIELDSIZE, $length ); $curl->setopt( CURLOPT_POST, 1 ); $curl->setopt( CURLOPT_CONNECTTIMEOUT,8);