![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 372 Pomógł: 1 Dołączył: 13.06.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam!
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> 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); ?> Dlaczego ten kod nie działa, coś napisałem źle? |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarząd Postów: 3 503 Pomógł: 28 Dołączył: 17.10.2002 Skąd: Wrocław ![]() |
Błędy jakieś?
Logi? Komunikaty? Fraszka? Wierszyk może? -------------------- |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 372 Pomógł: 1 Dołączył: 13.06.2008 Ostrzeżenie: (0%) ![]() ![]() |
Nic nie zwraca. Wypisuje "Poszło?", no bo wiadomo że przez echo i tyle. Dlatego właśnie zdzwiłem się i napisałem tutaj
![]() Uprzedzam pytania - login i hasło na pewno dobre. Kod print_r($s); Powinien wypisać strone, a nie wypisuje nic Ten post edytował Watt 5.09.2012, 11:29:53 |
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarząd Postów: 3 503 Pomógł: 28 Dołączył: 17.10.2002 Skąd: Wrocław ![]() |
Zamiasst print_r daj vzar_dump() - może false ci zwraca?
Cytat Returns TRUE on success or FALSE on failure. However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure.
-------------------- |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 372 Pomógł: 1 Dołączył: 13.06.2008 Ostrzeżenie: (0%) ![]() ![]() |
vzar_dump - nie działa, może chodziło o var_dump?
var_dump wyrzuca: Kod Poszlo?string(0) ""
|
|
|
![]()
Post
#6
|
|
![]() Grupa: Zarząd Postów: 3 503 Pomógł: 28 Dołączył: 17.10.2002 Skąd: Wrocław ![]() |
![]() U mnie jest inaczej ![]() -------------------- |
|
|
![]()
Post
#7
|
|
![]() Grupa: Moderatorzy Postów: 36 557 Pomógł: 6315 Dołączył: 27.12.2004 ![]() |
scanner a podałeś prawdziwe dane logowania?
![]() -------------------- "Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista "Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer |
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 10:22 |