after Derokorian's suggestion.. i came up with the solution:
the loop file creates the parameter need for the getdata.php (which is a date in YYYYMMDD format):
<?php
set_time_limit(0); //wanna run this till it finishes!
$getdate = '';
for($y = 2010; $y <= 2010; $y++)
{
for($m = 1; $m <= 12; $m++)
{
for($d = 1; $d <= 31; $d++)
{
if($d > 28 and !checkdate($m, $d, $y))
{
break;
}
$getdate .= sprintf("%04d%02d%02d", $y, $m, $d); //formatting the parameter into YYYYMMDD
include('/path/to/script/getdata.php.php');
sleep(10); //wait not to overload server!
}
}
}
?>
then.. for the getdata.php i commented out the $_GET function and other tid bits and added the $getdata variable passed by the loop.php:
<?php
// Suppress the debug information by changing it to false.
$_debug = true;
$getdate;
#if (isset($_GET['date'])) {
# if(preg_match('/^\d{8}$/', $_GET['date'])){
# $date=$_GET['date'];
# }else{
# die('Date format should be: yyyymmdd');
# }
# $y = substr($date, 0, 4);
# $m = trim(substr($date, 4, 2), '0');
# $d = trim(substr($date, 6), '0');
#
#}else{
# $y=date('Y');
# $m=date('n');
# $d=date('j');
#}
#
#
if($_debug){
echo $y . '/';
echo $m . '/';
echo $d;
echo '<br/>';
}
echo 'Process started.' . '<br/>';
// ultra secret php code that will get me fired if posted here
//
?>
and... voila!
no need to try and use 'include' or 'fopen' with parameters.. it just won't work!
i hope this can help others...
cheers
mrstevey!