Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Call Apple search
- $cas = curl_init('https://itunes.apple.com/lookup?id=' . $appID . '');
- curl_setopt($cas, CURLOPT_RETURNTRANSFER, 1);
- $jsonitunes = curl_exec($cas);
- curl_close($cas);
- //Process Apple search
- $arr = json_decode($jsonitunes,true);
- if ($arr['resultCount'] == '0') {
- //Delete obsolate apps
- mysqli_query($bd, "DELETE FROM appstoimport WHERE app = ".$appID."") or die(mysqli_error());
- }
- else {
- foreach($arr['results'] as $item) {
- if ($item['kind'] == 'software') {
- $price = $item['price'];
- if ($price > 0) {
- $free = 0;
- } else {
- $free = 1;
- }
- $icon = $item['artworkUrl512'];
- ...
- Rest of code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement