<?php
$page = $_SERVER['REQUEST_URI'];
$sec = "60";
?>
<?php 
$con = mysql_connect('localhost','astral_chameleon','chameleon.123');
if (!$con){
  die('Could not connect: ' . mysql_error());
}

mysql_select_db("astral_chameleonrocks", $con);


$productmodels = mysql_query('SELECT model FROM product where type=0');
while($productmodel = mysql_fetch_array($productmodels)) {

// echo $productmodel['model'] . " checking<br>";
    if(!file_exists('/home1/astral/public_html/chameleonrocks/image/data/test/'.$productmodel['model']))
    {
//	echo '/home1/astral/public_html/chameleonrocks/image/data/test/'.$productmodel['model'] . " Not Exists<br>";
//	$url = 'http://www.google.com';
//	$outputfile = "dl.html";
	$cmd = "wget -r  'ftp://silver:rjCaLmJkIOpK@silvertresor.com.au//public_html/tresorjewellery/image/data/test/". trim($productmodel['model'] ."'");
	echo $cmd .'<br>';
//	exec($cmd);
// 	break;

    }
}


echo "Find unavailable folders successfully\n";
mysql_close($con);
?>