I tried to retrieve my report from google adwords without entering username/password manually. Once I am in, I need to grab the content such as total cost and click. Here's my code so far:
<body onLoad="javascript:document.ff.submit()">
<form action="https://adwords.google.com/select/main#a" method="post name="ff">
<input type="hidden" name="cmd" value="LoginValidation">
<input type="hidden" name="hl" value="en_US">
<input type="hidden" name="login.userid" value="test@abc.com">
<input type="hidden" name="login.password" value="myPassword">
<input type="hidden" name="login">
</form>
</body>
<?
$url = "https://adwords.google.com/select/CampaignSummary";
sleep(120);
if ($fp = @fopen($url, "r")) {
while (!feof($fp)) $data .= fgets($fp, 128);
fclose($fp);
}
echo $data;
?>
So far, I am able to auto login - but I can't grab the data. Please help. Thanks.
Best Regards,
A.g