1

I am developing PHP script to programmatically download android apps device install report from Google Cloud Platform.

**Manually I follow below steps to download these reports **

  1. Login to Google Play Developer Console.
  2. Hit url : https://console.cloud.google.com/m/cloudstorage/b/pubsite_prod_rev_04681594767840986453/o/stats/installs/installs_com.bbi.amyloidosis_clinical_resources_201603_overview.csv 3.This forces browser to download csv file.

Now in PHP I try this



$url="https://console.cloud.google.com/m/cloudstorage/b/pubsite_prod_rev_04681594767840986453/o/stats/installs/installs_com.bbi.amyloidosis_clinical_resources_201603_overview.csv";

file_put_contents("Tmpfile.csv", fopen($filename, 'r'));

After that when i see Tmpfile.csv is actually html file.

Will curl help here ? Please provide help!

Pankaj
  • 360
  • 5
  • 22

1 Answers1

1

Your PHP script is not authentified to Google Play Developer Console. You must login with PHP first. Maybe check is there is an API with token that allow you to download these documents.

JesusTheHun
  • 1,217
  • 1
  • 10
  • 19
  • Yes I know that url is not authenticated to Google Play Developer Console. So I first login to Google Play Developer Console then run my php script. There is no Google Play API to access reports. So I trying to access it directly from Google Cloud Platform. – Pankaj May 20 '16 at 11:42
  • Then you can try to log in but scrapping documents from Google can be difficult especially without experience in scrapping. – JesusTheHun May 20 '16 at 11:46
  • Thanks, I look another authenticate way to access data – Pankaj May 25 '16 at 09:27