-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheyeem2koken_import_all.php
30 lines (27 loc) · 1.64 KB
/
eyeem2koken_import_all.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?
/////////////////////////////////////////////////////////////////////////////////////////////////
// //
// IMPORT ALL //
// //
/////////////////////////////////////////////////////////////////////////////////////////////////
// created by niz //
/////////////////////////////////////////////////////////////////////////////////////////////////
// This script transfert your ALL pictures from your Eyeem Account to your Koken server //
/////////////////////////////////////////////////////////////////////////////////////////////////
require('gps.php');
require('config.php');
require('functions.php');
require('eyeem2koken.php');
global $EyeemClientID, $EyeemClientSecret, $eyeem_token, $eyeem_username, $koken_url, $koken_token, $dir, $file, $eyeem_api_url, $koken_api_url;
///////////////////////////////////////////////////////////////////////////////////////////////
//Requesting picture list from Eyeem
//one first request to get the number of pictures of this account
///////////////////////////////////////////////////////////////////////////////////////////////
$eyeem_photos_list = 'users/'.$eyeem_username.'/photos?access_token='.$eyeem_token;
$photo_list_data = request($eyeem_api_url.$eyeem_photos_list);
$lp = $photo_list_data->photos->total;
// Importing
for ($a = 1; $a <= $lp; $a++) {
eyeem2koken();
}
?>