Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.
Parse Error: Class not found
I am using a godaddy free hosting with php latest php.ini file but not sure which version server is using:
Here is the error:
> Parse error: [i]syntax error, unexpected T_OBJECT_OPERATOR in /home/content/c/d/d/cddcp/html/PostZeep.php on line 22 [/i]
//Authenticate
$API_Key ='e64ed565-d411-4844-805a-9a830c1e7f67';
$Secret_Key= '11c45d9a27cae553c0f677a4c22bfbcd86eb528d' ;
$NDate = date('EEE, dd MMM yyy HH:mm:ss zzz');
$Body = urlencode("Art tho not Romeo, and a Montague?");
//REPLACE DYNAMICALLY$Parameters = "user_id=1234&body=" + $Body;
$canonicalString = $API_Key + $NDate + $Parameters;
echo $canonicalString;
$Mac = hash_hmac('sha1',$canonicalString,$Secret_Key);
$b64 = base64_encode($Mac);
$Auth = '"Zeep"+ $API_key +":"+$b64';
echo $Auth;
//End of authentication
//REPLACED
$user_id = 'user_id=1234&body=';
$Hbody = $user_id + $Body;
//Generate Post request & Send
$newDate = date('EEE, dd MMM yyy HH:mm:ss zzz');
$Host = 'https://api.zeepmobile.com/messaging/2008-07-14/send_message';
$Request = $_REQUEST;
Request->setPostFields(array('Authorization' => $Auth, 'Date' => $newDate, 'Content-Type' => 'application/x-www-form-urlencoded', 'Content-Length' => strlen(HBody)));
try {
Request->send()->getBody();
}
catch (HttpException $ex)
{
echo $ex;
}
?>```
wetbladez23 wrote:
$Request->setPostFields(array('Authorization' => $Auth, 'Date' => $newDate, 'Content-Type' => 'application/x-www-form-urlencoded', 'Content-Length' => strlen(HBody)));
try {
$Request->send()->getBody();
}
catch (HttpException $ex)
{
echo $ex;
}
?>```
There ya go.
> **K3174N 420 wrote:**
Line 22...
Request->setPostFields(array('Authorization' => $Auth, 'Date' => $newDate, 'Content-Type' => 'application/x-www-form-urlencoded', 'Content-Length' => strlen(HBody)));
it starts with (( and ends )))...
No... you fail. strlen is a function (1 parenthesis) and the array & function before it (2 parenthesis) makes 3.