AdWords API RelatedToUrlSearchParameter--TargetingIdeaSelector (PHP)

2010-03-19 Thread shaselton
Hello All,

Right to the situation on hand...

$url = 'www.example.com';

$selector = new TargetingIdeaSelector();
$selector-requestType = 'IDEAS';
$selector-ideaType = 'KEYWORD';
$selector-requestedAttributeTypes = array('KEYWORD');

$paging = new Paging();
$paging-startIndex = 0;
$paging-numberResults = 21;
$selector-paging = $paging;

$relatedToKeywordSearchParameter = new RelatedToUrlSearchParameter();
$relatedToKeywordSearchParameter-urls = array($url);
$selector-searchParameters = array($relatedToKeywordSearchParameter);

This returns 7 keywords of each matching type (exact, broad, and
phrase)   ( 7 [keywords] * 3 [types] = 21 results)
I am wanting only a single type (such as 'exact') of keyword returned
on searching the url, so I will have 21 keywords of one type rather
than 7.  Not quite sure how to do this on the
RelatedToUrlSearchParameter.  I know it can be done with
RelatedToKeywordSearchParameter, but that isn't my parameter.  Any
ideas?  Thanks!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.

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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

To unsubscribe from this group, send email to 
adwords-api+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


AdWords API RelatedToUrlSearchParameter--TargetingIdeaSelector (PHP)

2010-03-18 Thread shaselton
Hello All,

Right to the situation on hand...

$url = 'www.example.com';

$selector = new TargetingIdeaSelector();
$selector-requestType = 'IDEAS';
$selector-ideaType = 'KEYWORD';
$selector-requestedAttributeTypes = array('KEYWORD');

$paging = new Paging();
$paging-startIndex = 0;
$paging-numberResults = 21;
$selector-paging = $paging;

$relatedToKeywordSearchParameter = new RelatedToUrlSearchParameter();
$relatedToKeywordSearchParameter-urls = array($url);
$selector-searchParameters = array($relatedToKeywordSearchParameter);

This returns 7 keywords of each matching type (exact, broad, and
phrase)   ( 7 [keywords] * 3 [types] = 21 results)
I am wanting only a single type (such as 'exact') of keyword returned
on searching the url, so I will have 21 keywords of one type rather
than 7.  Not quite sure how to do this on the
RelatedToUrlSearchParameter.  I know it can be done with
RelatedToKeywordSearchParameter, but that isn't my parameter.  Any
ideas?  Thanks!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.

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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

To unsubscribe from this group, send email to 
adwords-api+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


AdWords API v200909 api AuthenticationError problems

2009-12-09 Thread shaselton
Hi,

I've been running into this problem for the last couple of days and
now am trying my luck here.  I seem to be having problems fetching my
authentication token.

I tried my log-in info for v13 to verify that I was sending the
correct data in the headers, and everything ran smoothly.

I didn't really change anything in the sample code for 'add campaign',
so I'm not quite sure what the hang up is.

add_campaign.php as follows

$email = 'xx...@gmail.com';
$password = 'x';
$client_email = 'xx...@gmail.com';
$user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
1.9.1.5) Gecko/20091102 Firefox/3.5.5';
$developer_token = 'xx';
$application_token = 'xx';
$account_type = 'GOOGLE';
$service = 'adwords';
$namespace = 'https://adwords.google.com/api/adwords/cm/v200906';
$auth = new AuthToken($email, $password, $account_type, $service);


AuthToken.php as follows:

$this-email = urlencode($email);
$this-passwd = urlencode($passwd);
$this-account_type = $account_type;
$this-service = $service;
$this-source = 'Google-AWAPI PhpSamples-v4.0.0';

$post_vars = 'accountType=' . $this-account_type . 'Email=' .
  $this-email . 'Passwd=' . $this-passwd .
'service=' .
  $this-service . 'source=' . $this-source;;

$ch = curl_init($post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$this-res = curl_exec($ch);


error:

AuthenticationError.USER_ID_INVALID @ ; trigger:'Invalid ads user id
in loginCookie. User id: -1'

$this-res isn't being set.

XML headers being sent after the fact:


?xml version=1.0 encoding=UTF-8?
SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/
envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-
ENC=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns6613=http://
tempuri.org
SOAP-ENV:Header
  RequestHeader xmlns=https://adwords.google.com/api/adwords/
cm/v200906
  authToken/authToken
  clientEmailx...@gmail.com/clientEmail
  passwordx/password
  userAgentMozilla/5.0 (Windows; U; Windows NT 5.1; en-
US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5/userAgent
  developerTokenx/developerToken
  applicationTokenx/applicationToken
   /RequestHeader
   /SOAP-ENV:Header
SOAP-ENV:Body
mutate xmlns=https://adwords.google.com/api/adwords/cm/
v200906
operations
operatorADD/operator
operand
endDate20101001/endDate
nameTest Campaign - 1260373797/name
statusPAUSED/status
biddingStrategy xsi:type=ManualCPC/
budget
periodDAILY/period
amount
currencyCodeUSD/currencyCode
microAmount10/microAmount
/amount
deliveryMethodSTANDARD/deliveryMethod
/budget
/operand
/operations
/mutate
/SOAP-ENV:Body
/SOAP-ENV:Envelope


have any ideas?  thanks!

--

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




AdWords API Re: v200909 api AuthenticationError problems

2009-12-09 Thread shaselton
sorry to bother...problem fixed!

On Dec 9, 8:06 am, shaselton shasel...@gmail.com wrote:
 Hi,

 I've been running into this problem for the last couple of days and
 now am trying my luck here.  I seem to be having problems fetching my
 authentication token.

 I tried my log-in info for v13 to verify that I was sending the
 correct data in the headers, and everything ran smoothly.

 I didn't really change anything in the sample code for 'add campaign',
 so I'm not quite sure what the hang up is.

 add_campaign.php as follows

 $email = 'xx...@gmail.com';
 $password = 'x';
 $client_email = 'xx...@gmail.com';
 $user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:
 1.9.1.5) Gecko/20091102 Firefox/3.5.5';
 $developer_token = 'xx';
 $application_token = 'xx';
 $account_type = 'GOOGLE';
 $service = 'adwords';
 $namespace = 'https://adwords.google.com/api/adwords/cm/v200906';
 $auth = new AuthToken($email, $password, $account_type, $service);

 AuthToken.php as follows:

 $this-email = urlencode($email);
 $this-passwd = urlencode($passwd);
 $this-account_type = $account_type;
 $this-service = $service;
 $this-source = 'Google-AWAPI PhpSamples-v4.0.0';

 $post_vars = 'accountType=' . $this-account_type . 'Email=' .
               $this-email . 'Passwd=' . $this-passwd .
 'service=' .
               $this-service . 'source=' . $this-source;;

 $ch = curl_init($post_url);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_vars);
 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 $this-res = curl_exec($ch);

 error:

 AuthenticationError.USER_ID_INVALID @ ; trigger:'Invalid ads user id
 in loginCookie. User id: -1'

 $this-res isn't being set.

 XML headers being sent after the fact:

 ?xml version=1.0 encoding=UTF-8?
 SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/
 envelope/ xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:SOAP-
 ENC=http://schemas.xmlsoap.org/soap/encoding/; xmlns:ns6613=http://
 tempuri.org
     SOAP-ENV:Header
           RequestHeader xmlns=https://adwords.google.com/api/adwords/
 cm/v200906
               authToken/authToken
               clientEmailx...@gmail.com/clientEmail
               passwordx/password
               userAgentMozilla/5.0 (Windows; U; Windows NT 5.1; en-
 US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5/userAgent
               developerTokenx/developerToken
               applicationTokenx/applicationToken
            /RequestHeader
        /SOAP-ENV:Header
     SOAP-ENV:Body
         mutate xmlns=https://adwords.google.com/api/adwords/cm/
 v200906
             operations
                 operatorADD/operator
                 operand
                     endDate20101001/endDate
                     nameTest Campaign - 1260373797/name
                     statusPAUSED/status
                     biddingStrategy xsi:type=ManualCPC/
                     budget
                         periodDAILY/period
                         amount
                             currencyCodeUSD/currencyCode
                             microAmount10/microAmount
                         /amount
                         deliveryMethodSTANDARD/deliveryMethod
                     /budget
                 /operand
             /operations
         /mutate
     /SOAP-ENV:Body
 /SOAP-ENV:Envelope

 have any ideas?  thanks!

--

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