I want to check keywords for CPC. And made small script in PHP

<?php
require_once 'AuthToken.php';
$email ='[email protected]' ;
$password='password';
$client_email='[email protected]';
$userAgent='Ranks';
$developerToken='wGT6qnJwn6g';
$applicationToken='Ranks';

        $authToken = new AuthToken($email, $password, 'adwords', 'PHP Code
Sample', 'GOOGLE');
$wsdl = 'https://adwords.google.com/api/adwords/v13/
TrafficEstimatorService?wsdl';
$namespace = 'https://adwords.google.com/api/adwords/v13';
$options = array(
    'features' => SOAP_SINGLE_ELEMENT_ARRAYS,
    'encoding' => 'utf-8');
$headers = new SoapHeader($namespace, 'RequestHeader', array(
    'authToken' => $authToken->GetAuthToken(),
    'clientEmail' => $client_email,
    'userAgent' => $userAgent,
    'developerToken' => $developerToken,
    'applicationToken' => $applicationToken));
$estimator_service= new SoapClient($wsdl, $options);
$estimator_service->__setSoapHeaders($headers);
   # Create keyword structure.
$keyword =
  '<keywordText>mars cruise</keywordText>' .
  '<keywordType>Exact</keywordType>' .
  '<language>en</language>';

# Check keyword traffic.
$request_xml =
  '<checkKeywordTraffic>' .
  '<requests>' . $keyword . '</requests>' .
  '</checkKeywordTraffic>';
$estimates = $estimator_service->call('checkKeywordTraffic',
$request_xml);
$estimates = $estimates['checkKeywordTrafficReturn'];
?>


And have this error:

PHP Fatal error:  Uncaught SoapFault exception: [Client] Function
("call") is not a valid method for this service in /var/www/test.php:36

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to