Skip to content

Instantly share code, notes, and snippets.

@coquer
Created August 12, 2015 13:21
Show Gist options
  • Save coquer/b54f922940c8d27c831e to your computer and use it in GitHub Desktop.
Save coquer/b54f922940c8d27c831e to your computer and use it in GitHub Desktop.
<?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