Re: How can i Get Account Balance ?
Yeap, this code is for old Adwords interface... new one has a lot of AJAX and complex to parse... I'm using manual TSV export from MCC for all clients and parse it in my app. Четвер, 13 листопада 2014 р. 08:24:47 UTC+2 користувач debellalitchin написав: Hi Freddie, i tried your code, its doesn't work. Only show 0. Maybe the code is outdated? On Tuesday, June 12, 2012 4:53:21 PM UTC+8, Freddie Leeman wrote: I've created a curl/php script to retreive you Adwords balance using php/curl. I hope this is usefull for you. ?php // -- // FUNCTION TO RETREIVE ADWORDS PREPAID BALANCE USING CURL by Freddie Leeman // -- $USERNAME = ; $PASSWORD = ; $COOKIE = /tmp/adwords.cookie; // - // DO NOT CHANGE ANYTHING BELOW THIS LINE // - $cookiehandle = fopen($COOKIE, 'w'); fclose($cookiehandle); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://adwords.google.com'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_COOKIEFILE, $COOKIE); $loginpage = curl_exec ($ch); $startpos = strpos($loginpage,name=\GALX\)+11; $startpos = strpos($loginpage, \, $startpos)+1; $stoppos = strpos($loginpage, \, $startpos); $GALXvalue = substr($loginpage,$startpos,$stoppos-$startpos); $postData = continue=https://adwords.google.com/um/gaiaauth;; $postData .= Email= . $USERNAME; $postData .= Passwd= . $PASSWORD; $postData .= GALX= . $GALXvalue; curl_setopt($ch, CURLOPT_URL, ' https://accounts.google.com/ServiceLoginAuth'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $postData); curl_exec ($ch); curl_setopt($ch, CURLOPT_URL, ' https://adwords.google.com/select/MakePayments?hl=en'); $content = curl_exec ($ch); curl_close ($ch); unlink($COOKIE); $startpos = strpos($content,euro;nbsp;)+12; $stoppos = strpos($content, /td, $startpos); $balance = substr($content,$startpos,$stoppos-$startpos); $balance = floatval(str_replace(,,.,str_replace(.,,$balance))); echo $balance; ? Op vrijdag 14 januari 2011 06:26:34 UTC+1 schreef Joe Chan het volgende: I read the reference abt account service but it seems there is no way to get the balance of the adword account Are there any way to get Account Balance via adword API? Regards, JOE -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/0272f332-0cfa-4375-b30e-168e1d5c12cb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How can i Get Account Balance ?
Hi Freddie, i tried your code, its doesn't work. Only show 0. Maybe the code is outdated? On Tuesday, June 12, 2012 4:53:21 PM UTC+8, Freddie Leeman wrote: I've created a curl/php script to retreive you Adwords balance using php/curl. I hope this is usefull for you. ?php // -- // FUNCTION TO RETREIVE ADWORDS PREPAID BALANCE USING CURL by Freddie Leeman // -- $USERNAME = ; $PASSWORD = ; $COOKIE = /tmp/adwords.cookie; // - // DO NOT CHANGE ANYTHING BELOW THIS LINE // - $cookiehandle = fopen($COOKIE, 'w'); fclose($cookiehandle); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://adwords.google.com'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_COOKIEFILE, $COOKIE); $loginpage = curl_exec ($ch); $startpos = strpos($loginpage,name=\GALX\)+11; $startpos = strpos($loginpage, \, $startpos)+1; $stoppos = strpos($loginpage, \, $startpos); $GALXvalue = substr($loginpage,$startpos,$stoppos-$startpos); $postData = continue=https://adwords.google.com/um/gaiaauth;; $postData .= Email= . $USERNAME; $postData .= Passwd= . $PASSWORD; $postData .= GALX= . $GALXvalue; curl_setopt($ch, CURLOPT_URL, ' https://accounts.google.com/ServiceLoginAuth'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $postData); curl_exec ($ch); curl_setopt($ch, CURLOPT_URL, ' https://adwords.google.com/select/MakePayments?hl=en'); $content = curl_exec ($ch); curl_close ($ch); unlink($COOKIE); $startpos = strpos($content,euro;nbsp;)+12; $stoppos = strpos($content, /td, $startpos); $balance = substr($content,$startpos,$stoppos-$startpos); $balance = floatval(str_replace(,,.,str_replace(.,,$balance))); echo $balance; ? Op vrijdag 14 januari 2011 06:26:34 UTC+1 schreef Joe Chan het volgende: I read the reference abt account service but it seems there is no way to get the balance of the adword account Are there any way to get Account Balance via adword API? Regards, JOE -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/67f4d445-7101-43d3-9859-8ce2d9466932%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How can i Get Account Balance ?
I've created a curl/php script to retreive you Adwords balance using php/curl. I hope this is usefull for you. ?php // -- // FUNCTION TO RETREIVE ADWORDS PREPAID BALANCE USING CURL by Freddie Leeman // -- $USERNAME = ; $PASSWORD = ; $COOKIE = /tmp/adwords.cookie; // - // DO NOT CHANGE ANYTHING BELOW THIS LINE // - $cookiehandle = fopen($COOKIE, 'w'); fclose($cookiehandle); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://adwords.google.com'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_COOKIEFILE, $COOKIE); $loginpage = curl_exec ($ch); $startpos = strpos($loginpage,name=\GALX\)+11; $startpos = strpos($loginpage, \, $startpos)+1; $stoppos = strpos($loginpage, \, $startpos); $GALXvalue = substr($loginpage,$startpos,$stoppos-$startpos); $postData = continue=https://adwords.google.com/um/gaiaauth;; $postData .= Email= . $USERNAME; $postData .= Passwd= . $PASSWORD; $postData .= GALX= . $GALXvalue; curl_setopt($ch, CURLOPT_URL, 'https://accounts.google.com/ServiceLoginAuth'); curl_setopt ($ch, CURLOPT_POST, 1); curl_setopt ($ch, CURLOPT_POSTFIELDS, $postData); curl_exec ($ch); curl_setopt($ch, CURLOPT_URL, 'https://adwords.google.com/select/MakePayments?hl=en'); $content = curl_exec ($ch); curl_close ($ch); unlink($COOKIE); $startpos = strpos($content,euro;nbsp;)+12; $stoppos = strpos($content, /td, $startpos); $balance = substr($content,$startpos,$stoppos-$startpos); $balance = floatval(str_replace(,,.,str_replace(.,,$balance))); echo $balance; ? Op vrijdag 14 januari 2011 06:26:34 UTC+1 schreef Joe Chan het volgende: I read the reference abt account service but it seems there is no way to get the balance of the adword account Are there any way to get Account Balance via adword API? Regards, JOE -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: How can i Get Account Balance ?
Hi Joe, This functionality is not available through AdWords API. Cheers, Anash P. Oommen, AdWords API Advisor. On Jan 14, 10:26 am, Joe Chan joec...@gmail.com wrote: I read the reference abt account service but it seems there is no way to get the balance of the adword account Are there any way to get Account Balance via adword API? Regards, JOE -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
How can i Get Account Balance ?
I read the reference abt account service but it seems there is no way to get the balance of the adword account Are there any way to get Account Balance via adword API? Regards, JOE -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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