Mam taki skrypt:
Kod
<?php
$cookie_file = 'cookie1.txt';
$c = curl_init('http://webcron.pl/index.html');
curl_setopt($c, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($c, CURLOPT_URL, 'http://webcron.pl/index.html');
curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12;MEGAUPLOAD 1.0");
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS,'login_send=true&username=login&password=haslo');
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_getinfo($c);
$b = curl_exec($c);
print $b;
curl_close($c);
?>
Dlaczego skrypt nie loguje się na tej stronie? (a na przykład na n-k ten skrypt działa poprawnie..)
pojawia sie taki błąd:
ForbiddenYou don't have permission to access /index.html on this server.
można coś z tym zrobić czy to dlatego że ta akurat strona (webcron.pl) ma jakieś zabezpieczenia?