Skip to content

Commit cee47f7

Browse files
authored
Update examples.php file
1 parent 980204c commit cee47f7

File tree

2 files changed

+62
-6
lines changed

2 files changed

+62
-6
lines changed

example.php

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples.php

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
// https://github.com/BaseMax/GooglePlayWebServiceAPI
3+
require "google-play.php";
4+
$google = new GooglePlay();
5+
6+
// Listing app details
7+
$app=$google->parseApplication("com.bezapps.flowdiademo");
8+
print_r($app);
9+
10+
// Listing available categories
11+
$cats = $google->parseCategories();
12+
13+
// Listing apps in a given category
14+
$category = 'TRAVEL_AND_LOCAL';
15+
$apps = $google->parseCategory($category);
16+
17+
// Listing Charts and Latest Additions
18+
$charts = $google->parseTopApps();
19+
$news = $google->parseNewApps();
20+
21+
// Listing what Google considers "similar apps" and "other apps from this developer"
22+
$packageName = "com.bezapps.flowdiademo";
23+
$similar = $google->parseSimilar($packageName);
24+
$other = $google->parseOthers($packageName);
25+
26+
// Searching for apps by keywords
27+
$query = 'sms backup';
28+
$apps = $google->parseSearch($query);
29+
30+
// Obtaining app permissions
31+
$perms = $google->parsePerms($packageName)
32+
33+
// How to action as a crawler and find more applications?
34+
$alphas = range('A', 'Z');
35+
foreach($alphas as $alpha) {
36+
$apps=$google->parseSearch($alpha);
37+
print_r($apps);
38+
}
39+
// or
40+
$alphas = range('A', 'Z');
41+
foreach($alphas as $alpha) {
42+
$apps=$google->parseSearch($alpha);
43+
print_r($apps);
44+
foreach($alphas as $alpha2) {
45+
$apps=$google->parseSearch($alpha.$alpha2);
46+
print_r($apps);
47+
}
48+
}
49+
// It's more
50+
$alphas = range('A', 'Z');
51+
foreach($alphas as $alpha) {
52+
$apps=$google->parseSearch($alpha);
53+
print_r($apps);
54+
foreach($alphas as $alpha2) {
55+
$apps=$google->parseSearch($alpha.$alpha2);
56+
print_r($apps);
57+
foreach($alphas as $alpha3) {
58+
$apps=$google->parseSearch($alpha.$alpha2.$alpha3);
59+
print_r($apps);
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)