コード例 #1
0
ファイル: itunes.php プロジェクト: roseblumentopf/mywatchlst
 /**
 * Set a new config
 *
 * <code>
 * iTunes::config('index', 'value');
 * iTunes::config(array('index' => 'value'));
 * </code>
 *
 * @access public
 * @static
 * @param array|string $index (default: array())
 * @param string $value (default: null)
 * @param string $type (default: 'search')
 * @return void
 */
 public static function config($index = array(), $value = null, $type = 'search')
 {
     if (!is_array($index)) {
         $index = array($index => $value);
     } elseif (is_array($index) && $value !== null) {
         $type = $value;
     }
     if ($type == 'lookup') {
         self::$_lookup_config = array_merge(self::$_lookup_config, $index);
     } else {
         self::$_search_config = array_merge(self::$_search_config, $index);
     }
 }
コード例 #2
0
ファイル: web.php プロジェクト: Neorun1987/appstore
<input type="submit" value="Submit" />
</form>
<?php 
if (isset($_REQUEST['to']) && $_REQUEST['to']) {
    header('location: http://github.com/sskaje/appstore/');
    exit;
}
$apple_id = isset($_REQUEST['apple_id']) && !empty($_REQUEST['apple_id']) ? trim($_REQUEST['apple_id']) : die('Apple ID!!!');
$apple_password = isset($_REQUEST['apple_password']) && !empty($_REQUEST['apple_password']) ? trim($_REQUEST['apple_password']) : die('Apple ID Password!!!');
$appshopper_username = isset($_REQUEST['appshopper_username']) && !empty($_REQUEST['appshopper_username']) ? trim($_REQUEST['appshopper_username']) : die('AppShopper Username!!!');
$appshopper_password = isset($_REQUEST['appshopper_password']) && !empty($_REQUEST['appshopper_password']) ? trim($_REQUEST['appshopper_password']) : die('AppShopper Password!!!');
require __DIR__ . '/classes/iTunes.class.php';
require __DIR__ . '/classes/Appshopper.class.php';
$appshopper = new Appshopper();
$appshopper->login($appshopper_username, $appshopper_password);
$itunes = new iTunes();
$itunes->apple_id = $apple_id;
$itunes->password = $apple_password;
$itunes->guid = '11111111.22222222.00000000.44444444.CC0183D3.33019387.512309CA';
$itunes->login();
$app_ids = array();
$ids = $itunes->getPurchasedIDList();
if (!isset($ids['Apps']) || empty($ids['Apps'])) {
    die('No purchased app found.');
}
$app_ids += $ids['Apps'];
$ih = 'no';
if (isset($_REQUEST['import_hidden']) && $_REQUEST['import_hidden']) {
    $ids = $itunes->getPurchasedIDList(true);
    if (isset($ids['Apps']) && !empty($ids['Apps'])) {
        $app_ids += $ids['Apps'];
コード例 #3
0
ファイル: test.php プロジェクト: songbaogang/itunes-search
<?php

include 'iTunes.php';
$iTunes = new iTunes();
$result = $iTunes->search(array('term' => 'Taylor Swift', 'media' => 'music'));
?>
    <table>
        <tr>
            <th>Artist Name</th>
            <th>Track Name</th>
            <th>Album</th>
        </tr>

        <?php 
foreach ($result->results as $data) {
    ?>
            <tr>
                <td> <?php 
    echo $data->artistName;
    ?>
 </td>
                <td> <?php 
    echo $data->trackName;
    ?>
 </td>
                <td> <?php 
    echo $data->collectionName;
    ?>
 </td>
            </tr>
        <?php 
コード例 #4
0
ファイル: test_redeem.php プロジェクト: Neorun1987/appstore
<?php

require __DIR__ . '/../src/classes/iTunes.class.php';
$itunes = new iTunes();
$itunes->apple_id = '*****@*****.**';
$itunes->password = '******';
$itunes->guid = '11111111.22222222.00000000.44444444.CC0183D3.33019387.512309CA';
$itunes->login();
#$itunes->redeem('YWHENYYFMAHF');exit;
$codes = <<<CODE
WNNF9K7M3TPX
3HNT4N7H6PLL
AY7XFR64XXNM
KH4LXLXRJ9RW
LMWA7FYK94PY
7HMA6MWPN36H
EXKTAR6KXK36
HELTLFRK9THY
E46NXJYNL9HL
9KYTLRJLFM44
YTMKPAFMPHN7
FLR6EMW437JF
37E4AYYA4L34
6PM4PLMXN43H
47XLN37JR934
JLXYN7MJMMHE
WR4MT3MP746F
E6JT34A6LNKH
9A4PANA7F99W
N9TNTNR3PW3Y
RYA4RPYEFYXE
コード例 #5
0
ファイル: test.php プロジェクト: AnthonyBloomer/itunes-search
    <table>
        <tr>
            <th>Artist Name</th>
            <th>Track Name</th>
            <th>Album</th>
        </tr>

        <? foreach ($result->results as $data) : ?>
            <tr>
                <td> <? echo $data->artistName ?> </td>
                <td> <? echo $data->trackName ?> </td>
                <td> <? echo $data->collectionName ?> </td>
            </tr>
        <? endforeach ?>

    </table>


<?

$result = iTunes::lookup(array(
    'id' => '159260351'  
));

foreach ($result->results as $data) : ?>

    <h2><? echo $data->artistName ?></h2>
    <p>Genre: <? echo $data->primaryGenreName ?></p>

<? endforeach ?>
コード例 #6
0
ファイル: test.php プロジェクト: Neorun1987/appstore
<?php

require __DIR__ . '/../src/classes/iTunes.class.php';
$itunes = new iTunes();
$itunes->apple_id = '*****@*****.**';
$itunes->password = '******';
$itunes->guid = '11111111.22222222.00000000.44444444.CC0183D3.33019387.512309CA';
$itunes->login();
//$itunes->buy_purchased('319927587');
#$ids = $itunes->getPurchasedIDList();
#var_dump($ids);
$itunes->getPurchasedAppInfo();
コード例 #7
0
<?php

include_once "php_includes/movie_data.php";
function umlautepas($string)
{
    $upas = array("ae" => "ä", "ue" => "ü", "oe" => "ö", "Ae" => "Ä", "Ue" => "Ü", "Oe" => "Ö");
    return strtr($string, $upas);
}
$row = getRow();
$itunes = iTunes::search($row[5], array('country' => 'US', 'entity' => 'movie'))->results;
$available = 0;
$trackPrice = 0;
$trackRentalPrice = 0;
if (count($itunes) > 0) {
    echo "original";
    for ($i = 0; $i < count($itunes); $i++) {
        $itunesdate = $itunes[$i]->releaseDate;
        $itunesyeararray = explode("-", $itunesdate);
        $itunesyear = $itunesyeararray[0];
        @($pos = strpos($itunes[$i]->trackName, $row[5]));
        //Fehler wegen ->undefinded property stdclass->trackname
        $posdir = strpos($itunes[$i]->artistName, getDirector($row));
        //echo $posdir;
        if (getDirector($row) === $itunes[$i]->artistName && $row[5] === $itunes[$i]->trackName) {
            $rows = $i;
            $available = 1;
            echo "1";
            break;
        }
        if (getDirector($row) === $itunes[$i]->artistName) {
            $rows = $i;