Created
August 12, 2015 13:21
-
-
Save coquer/b54f922940c8d27c831e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by IntelliJ IDEA. | |
* User: jycr753 | |
* Date: 8/11/15 | |
* Time: 11:54 PM | |
*/ | |
include_once('APIExternalContentUpdater.php'); | |
include_once('DatabaseController.php'); | |
$cities = array( | |
'turkana', | |
'nyeri', | |
'Nairobi' | |
); | |
$apiController = new APIExternalContentUpdater(); | |
$databaseController = new DatabaseController(); | |
$databaseController->prepareDatabaseForUpdate(); | |
foreach($cities as $city){ | |
$data = $apiController->init($city); | |
$update_data = $databaseController->updateData($data); | |
if($update_data['success'] == true){ | |
echo "Working good -> {$city}\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment