Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Closed TopicStart new topic
> [HTML][PHP]Curl -, The URL has moved here | safe_mode
Wertas
post 14.01.2011, 21:37:49
Post #1





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 2.03.2010

Ostrzeżenie: (0%)
-----


http://kavvson.pl/ec/curl/0.php

Poprzedni Curl loguje się do formularza i działa. Natomiast ten 2 pokazuje The URL has moved here. CHOMOD jest na cookies.txt co tam jeszcze serwer nie obsługuje :

Cytat
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/kavvson/public_html/ec/curl/0.php on line 96


  1. $url1 = "http://s1.empcraft.pl/main.do"; // URL
  2. #$reffer = "http://www.empcraft.pl/";
  3. $agent = "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13";
  4. $ch = curl_init(); // Initialize a CURL session.
  5. $cookie_file_path = "cookie.txt"; // Please set your Cookie File path. This file must have CHMOD 777 (Full Read / Write Option).
  6. curl_setopt($ch, CURLOPT_URL, $url1); // The URL to fetch. You can also set this when initializing a session with curl_init().
  7. curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path); // The name of the file containing the cookie data. The cookie file can be in Netscape format, or just plain HTTP-style headers dumped into a file.
  8. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path); // The name of a file to save all internal cookies to when the connection closes.
  9. #curl_setopt($ch, CURLOPT_HTTPHEADER, $header_array);
  10. curl_setopt($ch, CURLOPT_USERAGENT, $agent); // The contents of the "User-Agent: " header to be used in a HTTP request.
  11. #curl_setopt($ch, CURLOPT_POST, 1); //TRUE to do a regular HTTP POST. This POST is the normal application/x-www-form-urlencoded kind, most commonly used by HTML forms.
  12. #curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS); //The full data to post in a HTTP "POST" operation.
  13. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.
  14. #curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // TRUE to follow any "Location: " header that the server sends as part of the HTTP header (note this is recursive, PHP will follow as many "Location: " headers that it is sent, unless CURLOPT_MAXREDIRS is set).
  15. #curl_setopt($ch, CURLOPT_REFERER, $reffer); //The contents of the "Referer: " header to be used in a HTTP request.
  16.  
  17. $result = curl_exec($ch); // grab URL and pass it to the variable.
  18. curl_close($ch); // close curl resource, and free up system resources.
  19.  
  20. echo $result; // Print page contents.


Proszę o pomoc i propozycje
Go to the top of the page
+Quote Post
wookieb
post 14.01.2011, 22:13:52
Post #2





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




Cytat
18. Zabronione jest tworzenie, publikowanie, wykorzystywanie lub rozpowszechnianie wszelkiego rodzaju niezależnych oprogramowań bez pisemnej zgody Mail.Ru Games (w tym między innymi makroprogramów, programów do tworzenia botów, emulatorów, serwerów, programów służących do gromaczenia informacji etc.).

Nie pomagamy w łamaniu prawa/regulaminów.


--------------------
Go to the top of the page
+Quote Post
hwao
post 15.01.2011, 12:37:25
Post #3


Developer


Grupa: Moderatorzy
Postów: 2 844
Pomógł: 20
Dołączył: 25.11.2003
Skąd: Olkusz




@Wertas Jak tylko przedstawisz pisemne pozwolenie od Mail.Ru Games któremuś z moderatorów/opiekunów otworzymy temat i postaramy się pomoc.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 13:50