Try to get Report for each company in MCC like this

$cmps = file(dirname(__FILE__).'/../../../../companies.txt');
  //print_r($cmps);
  foreach ($cmps as $i=>$c){
  list($cname,$cid) = explode(',',$c);
  $user = new AdWordsUser();
    //print_r($cid);
    $user->SetClientCustomerId($cid);
  // Log every SOAP XML request and response.
  $user->LogAll();

  // Download the report to a file in the same directory as the example.
  $filePath = dirname(__FILE__) . '/report'.$i.'.csv';

  // Run the example.
  DownloadCriteriaReportExample($user, $filePath);
}

Answer is "An error has occurred: Report download failed."

When I pas to SetClientCustomerId not a variable, just sting like 
$user->SetClientCustomerId('3xx-xx-xxx4') reports are downloaded 
succesfully.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/93c45539-5d89-4867-b55d-179a8f90740e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to