Chciałem zarobić trochę $ na uploadzie plików na wiele serwisów, pomyślałem sobie, że automat zrobi to za mnie lepiej no i oczywiście utknąłem na zanym początku

Czesc ich kodu html z logowaniem:
Kod
<form id="login" action="/auth/login" method="post">
<div class="popup-login hidden">
<input type="text" class="txt up-login" name="LoginForm[email]"/>
<input type="password" class="txt up-login" name="LoginForm[password]"/>
<div class="wrap">
<div class="inp">
<p><input type="checkbox" class="ch" id="rem" checked="checked" name="LoginForm[rememberMe]" value="1"/> <label for="rem">Remember me</label></p>
<a href="/account/ForgotPassword" class="restore">Forgot password</a>
</div>
<a class="btn-login" style="cursor:pointer;" onclick ="document.forms.login.submit();">Login</a>
</div>
</div>
</form>
<div class="popup-login hidden">
<input type="text" class="txt up-login" name="LoginForm[email]"/>
<input type="password" class="txt up-login" name="LoginForm[password]"/>
<div class="wrap">
<div class="inp">
<p><input type="checkbox" class="ch" id="rem" checked="checked" name="LoginForm[rememberMe]" value="1"/> <label for="rem">Remember me</label></p>
<a href="/account/ForgotPassword" class="restore">Forgot password</a>
</div>
<a class="btn-login" style="cursor:pointer;" onclick ="document.forms.login.submit();">Login</a>
</div>
</div>
</form>
Mój kod:
Kod
<?php
$cookie_file = 'cookie.txt';
$c = curl_init('http://rapidgator.net/');
curl_setopt($c, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($c, CURLOPT_URL, 'http://rapidgator.net/auth/login');
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;");
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS,
'LoginForm[email]=xxx@gmail.com&LoginForm[password]=xxx123&LoginForm[rememberMe]=1');
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_getinfo($c);
$s = curl_exec($c);
curl_close($c);
echo "Poszlo?";
print_r($s);
?>
$cookie_file = 'cookie.txt';
$c = curl_init('http://rapidgator.net/');
curl_setopt($c, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($c, CURLOPT_URL, 'http://rapidgator.net/auth/login');
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;");
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS,
'LoginForm[email]=xxx@gmail.com&LoginForm[password]=xxx123&LoginForm[rememberMe]=1');
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_getinfo($c);
$s = curl_exec($c);
curl_close($c);
echo "Poszlo?";
print_r($s);
?>
Dlaczego ten kod nie działa, coś napisałem źle?