Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]Curl jak zrobić rejestracje?
--jambos--
post
Post #1





Goście







  1. <?php
  2. $f['username'] = 'jambos';
  3. $f['password'] = 'czartor';
  4. $f['redirect'] = '';
  5. $f['login'] = 'Zaloguj';
  6. $f['msg_expire'] = '0';
  7. $f['accesskey'] = 's';
  8. $f['tabindex'] = '6';
  9. $f['msg_icon'] = '0';
  10. $tytul = $_POST['tytul'];
  11. $message = $_POST['opis'];
  12. $l = $link . '/login.php';
  13.  
  14. $ch = curl_init();
  15. curl_setopt($ch, CURLOPT_TIMEOUT, 10);
  16. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  17. curl_setopt($ch, CURLOPT_URL, $l);
  18. curl_setopt($ch, CURLOPT_POST, 1);
  19. curl_setopt($ch, CURLOPT_POSTFIELDS, $f);
  20. curl_setopt($ch,CURLOPT_FOLLOWLOCATION, 0);
  21. curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/cookies.txt');
  22. curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookies.txt');
  23. curl_exec($ch);
  24. $useragent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1";
  25.  
  26. // set user agent
  27. curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
  28. ?>

mam taki oto skrypt php do logowania na forum phpbb by przemo
jak moge zrobic skrypt do rejestracji na forum?
próbowałem cos takiego
[php]
<?php
$imie=niezlabania('imie');
$haslo=haslo('hasło');
$c = curl_init();
curl_setopt($c, CURLOPT_URL, '');
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, ');
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$page = curl_exec($c);
curl_close($c);

?>
ale nie działą
Go to the top of the page
+Quote Post
--jambos--
post
Post #2





Goście







  1. <?php
  2.  
  3. for($i=1; $i > 0 ; $i++){
  4. $handle = fopen('konta.txt', "a");
  5. $postFields['username'] = substr(uniqid(), 5, 10);
  6. $haslo = substr(uniqid(), 0, 5);
  7. $rand1 = rand(0,10);
  8. $rand2 = rand(10,100);
  9. $los = $rand1 + $rand2;
  10. $haslo = $haslo.$los;
  11. $postFields['password'] = $haslo;
  12. $postFields['rl_name'] = $haslo;
  13. $postFields['social_id'] = rand(1000000,9999999);
  14. $postFields['autoloot_expire'] = '2090-04-25 18:00:00';
  15. $postFields['submit'] = 'Register';
  16. print_r($postFields);
  17. $ch = curl_init('http://niezlabania.pl/profile.htm');
  18. curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
  19.  
  20. curl_exec($ch);
  21. curl_close($ch);
  22. fwrite($handle, 'ID:'.$postFields['username'].' HASLO: '. $haslo."\n");
  23. fclose($handle);
  24.  
  25. }
  26. ?>

próbowalem tez taki skrypt ale nadal bez skutku
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 11:33