Skip to content

Commit

Permalink
Update scraper.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Nov 23, 2015
1 parent 0c725a6 commit 55195d5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scraper.php
Expand Up @@ -27,7 +27,12 @@

<?php
require 'scraperwiki.php';
$endtime = time() + (60 * 60); //1h
for ($id = 900001; $id <= 1200000; $id++) {
if ($endtime <= time())
{
exit;
}
$i = 1;
$delay = 250000;
if (!validateEntry($id))
Expand Down Expand Up @@ -100,7 +105,13 @@ function validateEntry($id){
try {
$recordSet = scraperwiki::select("* from data where id ='". $id . "'");
if (!empty($recordSet[0]['id'])) {
if ($recordSet[0]['firstname'] != "" and $recordSet[0]['surname'] != ""){
if ($recordSet[0]['surname'] != ""){
$result = true;
}
if ($recordSet[0]['firstname'] != ""){
$result = true;
}
if ($recordSet[0]['fathername'] != ""){
$result = true;
}
}
Expand Down

0 comments on commit 55195d5

Please sign in to comment.