Hallo Leute!
Ich bekomme folgende Fehlermeldung:
Mein .php Code:
an was liegt das?
Bitte um Hilfe
thanks
Ich bekomme folgende Fehlermeldung:
Code:
Warning: file_get_contents(http://85.126.***.***:8753/pictures.php): failed to open stream: no suitable wrapper could be found in /var/www/localhost/htdocs/MuBisA/cronjob.php on line 21
PHP-Code:
<?php
include ('db_con.php');
$timestamp = time();
$datum = date("Y-m-d H:i:s", $timestamp);
$connection = db_connect();
function getPicFromServer ($rServerPath, $lServerPath) {
$rServer['path'] = $rServerPath;
$lServer['path'] = $lServerPath;
$rServer['picDir'] = str_replace('pictures.php', '', $rServer['path']);
$rServer['source'] = file_get_contents($rServer['path']);
$rServer['picUrls'] = explode("<br />", $rServer['source']);
for ($i = 0; $i < count($rServer['picUrls'])-1; $i++) {
echo $rServer['picDir'].$rServer['picUrls'][$i].'<br>';
copy($rServer['picDir'].$rServer['picUrls'][$i], $lServerPath.$rServer['picUrls'][$i]);
}
}
$abfrage = mysql_query("SELECT id,user_id,timedate FROM events");
if(mysql_num_rows($abfrage)){
while($row = mysql_fetch_assoc($abfrage)){
$time = time();
$yearMonthDay = explode("-", $row['timedate']);
$year = $yearMonthDay[0];
$month = $yearMonthDay[1];
$daysplit = explode(" ", $yearMonthDay[2]);
$day = trim($daysplit[0]);
$HourMinuteSeconds = explode(":", $daysplit[1]);
$Hour = $HourMinuteSeconds[0];
$Minute = $HourMinuteSeconds[1];
$Seconds = $HourMinuteSeconds[2];
$dateInSeconds = mktime((int)$Hour, (int)$Minute, (int)$Seconds, (int)$month, (int)$day, (int)$year);
$thirtyMinutes = 60*30;
$datum1 = date("Y-m-d H:i:s", $dateInSeconds);
//Jetzt beginnt die eigentliche Abfrage
if(($time-$thirtyMinutes) < $dateInSeconds && $dateInSeconds <= $time){
$userSelect = mysql_query("SELECT device_id FROM user WHERE id = '".mysql_real_escape_string($row['user_id'])."'");
$user = mysql_fetch_assoc($userSelect);
$device = mysql_query("SELECT * FROM device WHERE id='".$user['device_id']."'");
$userdevice = mysql_fetch_assoc($device);
$url = "http://".$userdevice['IP'].":".$userdevice['port']."/";
getPicFromServer ($url."pictures.php", "http://www.php.de/images/".$row['user_id']."/".$row['id']."/");
}
}
}
?>
Bitte um Hilfe
thanks
Kommentar