Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]curl zwracający string?
Demoneos
post 20.05.2010, 16:04:14
Post #1





Grupa: Zarejestrowani
Postów: 149
Pomógł: 0
Dołączył: 26.02.2008

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


curl_exec zwraca zawartość strony:
  1. $site = curl_exec($ch);

tylko, że chyba w formacie object. Natomiast ja chciałbym żeby był formacie string. Próbowałem to
przekonwertować na string:
  1. settype($site, "string");

używałem też konwersji, ale nie pomogło.

Czy jest jakiś sposób, żebym zawartość którą zwraca curl byłą w formie string?

Ten post edytował Demoneos 20.05.2010, 16:05:12


--------------------
Go to the top of the page
+Quote Post
marcio
post 20.05.2010, 16:42:45
Post #2





Grupa: Zarejestrowani
Postów: 2 291
Pomógł: 156
Dołączył: 23.09.2007
Skąd: ITALY-MILAN

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


http://php.net/manual/en/function.curl-exec.php
Notka: Return Values
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.

Z tego co ja zrozumialem zwraca zrodlo strony ktore raczej jest w postaci string'a, zreszta sam kiedys uzywalem cURL'a i nie spotkalem sie z takim problemem.


--------------------
Zainteresowania: XML | PHP | MY(SQL)| C# for .NET | PYTHON
http://code.google.com/p/form-builider/
Moj blog
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 Wersja Lo-Fi Aktualny czas: 31.07.2025 - 10:52