Burny
Legacy Member
Ik heb een basic scriptje om mijn volume van mijn internetverbinding te checken.
Maar ik krijg de volgende fout:
Volgens mijn hosting probeert curl ergens iets weg te schrijven waar het niet mag. Maar ik laat curl (voor zover ik weet) niets wegschrijven. Of heeft het te maken met die cookie?
Hier mijn broncode:
Heeft iemand hier een oplossing voor?
Maar ik krijg de volgende fout:
Code:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /var/www/vhosts/domain.be/httpdocs/basic.php on line 10
Warning: curl_setopt() [function.curl-setopt]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/domain.be/httpdocs:/tmp) in /var/www/vhosts/domain.be/httpdocs/basic.php on line 12
Warning: curl_setopt() [function.curl-setopt]: open_basedir restriction in effect. File() is not within the allowed path(s): (/var/www/vhosts/domain.be/httpdocs:/tmp) in /var/www/vhosts/domain.be/httpdocs/basic.php on line 13
Volgens mijn hosting probeert curl ergens iets weg te schrijven waar het niet mag. Maar ik laat curl (voor zover ik weet) niets wegschrijven. Of heeft het te maken met die cookie?
Hier mijn broncode:
Code:
<?php
// URL voor login volgen
$ch = curl_init();
$url = "https://crm.schedom-europe.net/login.php?username=&password=&op=login";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiejar);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
curl_exec($ch);
// Afbeelding met volume weergeven
// Is nodig voor firefox etc, anders niet weergegeven
header("Content-type: image/png");
$newurl = "https://crm.schedom-europe.net/include/scripts/linked/dslinfo/graph.php?dsluser=&passwd=";
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiejar);
curl_setopt($ch, CURLOPT_URL, $newurl);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)'); // IE6
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_COOKIESESSION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$volume = curl_exec($ch);
echo $volume;
?>
Heeft iemand hier een oplossing voor?