zootreeves
February 13th, 2006, 05:48 PM
HI,
I'm trying to get alexa website information using their API, but I cannot figure out the authentication system. Has anyone got a script that use alexa & php?
Here is what i have got so far:
<?php
$WsdlUri = 'http://awis.amazonaws.com/AWSAlexa/AWSAlexa.wsdl';
$params = array(
'AWSAccessKeyId' => '<<My Access Key>>',
'Timestamp' => time(),
'Signature' => base64_encode("<<My Secret Key>>"),
'Url' => "http://www.test.com";
);
#print time();
$Client = new SoapClient($WsdlUri);
$O = $Client -> UrlInfo($params);
print_r($O);
?>
Which outputs:
stdClass Object ( [OperationRequest] => stdClass Object ( [HTTPHeaders] => stdClass Object ( [Header] => stdClass Object ( [Name] => UserAgent [Value] => PHP SOAP 0.1 ) ) [RequestId] => 08KVFE5SESYG5HPFDW70 [Arguments] => stdClass Object ( [Argument] => stdClass Object ( [Name] => Service [Value] => AlexaWebInfoService ) ) [Errors] => stdClass Object ( [Error] => stdClass Object ( [Code] => AWS.RequestExpired [Message] => AWS_RequestExpired_4316 ) ) ) )
I'm trying to get alexa website information using their API, but I cannot figure out the authentication system. Has anyone got a script that use alexa & php?
Here is what i have got so far:
<?php
$WsdlUri = 'http://awis.amazonaws.com/AWSAlexa/AWSAlexa.wsdl';
$params = array(
'AWSAccessKeyId' => '<<My Access Key>>',
'Timestamp' => time(),
'Signature' => base64_encode("<<My Secret Key>>"),
'Url' => "http://www.test.com";
);
#print time();
$Client = new SoapClient($WsdlUri);
$O = $Client -> UrlInfo($params);
print_r($O);
?>
Which outputs:
stdClass Object ( [OperationRequest] => stdClass Object ( [HTTPHeaders] => stdClass Object ( [Header] => stdClass Object ( [Name] => UserAgent [Value] => PHP SOAP 0.1 ) ) [RequestId] => 08KVFE5SESYG5HPFDW70 [Arguments] => stdClass Object ( [Argument] => stdClass Object ( [Name] => Service [Value] => AlexaWebInfoService ) ) [Errors] => stdClass Object ( [Error] => stdClass Object ( [Code] => AWS.RequestExpired [Message] => AWS_RequestExpired_4316 ) ) ) )