Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]{Curl} Logowanie za pomocą Curl'a i pobieranie danych.
Rewil
post
Post #1





Grupa: Zarejestrowani
Postów: 175
Pomógł: 0
Dołączył: 19.09.2009

Ostrzeżenie: (10%)
X----


Jednak dalej błąd ;/
  1. Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/gamin/domains/gamingpl.com
  2. /public_html/global/curl.php on line 14


  1. function connect_curl($url, $post='')
  2. {
  3. $curl=curl_init();
  4. curl_setopt($curl, CURLOPT_URL, $url);
  5. curl_setopt($curl, CURLOPT_REFERER, "http://gamingpl.com");
  6. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  7. curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3');
  8. curl_setopt($curl, CURLOPT_TIMEOUT, 30);
  9. curl_setopt($curl, CURLOPT_HEADER, 0);
  10. if(strlen($post)>0)
  11. {
  12. curl_setopt($curl, CURLOPT_POST, 1);
  13. curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
  14. }
  15. $strona=curl_exec($curl);
  16. echo $strona;
  17. curl_close($curl);
  18. }
  19.  
  20. connect_curl('http://www.gambling-affiliation.com/_front/login.php', $post='_qf__authentification=&login=&password=&type=0&submit=Connexion');


Ten post edytował Rewil 29.06.2010, 16:22:40
Go to the top of the page
+Quote Post

Posty w temacie


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:20