Wiem, ¿e temat by³ wa³kowany, ale w ¿adnym w±tku nie znalaz³em rozwi±zania dla swojego przypadku.
Otó¿; mam taki kod:
$header[0] = "Accept: text/xml,application/xml,application/xhtml+xml,"; $header[0] .= "text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"; $header[] = "Cache-Control: max-age=0"; $header[] = "Connection: keep-alive"; $header[] = "Keep-Alive: 300"; $header[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $header[] = "Accept-Language: en-us,en;q=0.5"; $header[] = "Pragma: "; $curl=curl_init($_GET['url']); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19 (.NET CLR 3.5.30729)'); curl_setopt($curl, CURLOPT_HTTPHEADER, $header); curl_setopt($curl, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($curl, CURLOPT_AUTOREFERER, true); curl_setopt($curl, CURLOPT_TIMEOUT, 10); $res = curl_exec($curl);
I po podaniu danych GET np. ?url=http://whatismyipaddress.com/
Dostajê co¶ takiego
Cytat
�������¥YmSÛ8�½ýZ¿ØÂL'PBz)[æ d ½�{ÕQl%Q±-×�¡éÍ~÷ûý%Û±�Ðî];ClIÿçgyøëéõÉí¿'gìÃíÕ%�|z�yqÂjÿ!õñ�ú4Vf3Íóþ¼¸ºûT"&|!üK17ÄÊÿ�âa(r¯ÅòÏr|.L¸Gm���ËÃÃ��VL¥±âѱ'Si$�:[Û�²#yÏ$Öáô©õ¥já!ç�gÕVh�¹>�9ÃnÒ¿WÃ_}���çÑçê�6pæûTú�RòPgq òª�ÛÃ.s?%�åN�!áùB¦�v`��E$±< Ú�@Ö�ÅJjÿð°Ûßßëîîwwz»ÖÒd�Vh6@ ðDu�³Ê]� ¶BmT!ò�µuv�÷Ôr/ùhh�£�éd��,ñ�®ï�lºBAH´Õþä�Î_ç
To jest bardzo krótki fragment.Co mam z tym zrobiæ, ¿eby dostaæ NORMALNE, czytelne warto¶ci?
Pozdrawiam.