I’m trying to use CURL and/or file_get_contents
curl_setopt($ch, CURLOPT_URL, “http://freecampsites.net/attribute/states/ut/”);
to pull back the web page code. The problem is, the encoding (correct word?) comes back looking like:
‹������í}k{Û6ÒèçøW LeÙ»¦$êæ»z'iÒM×vê·§íã‘Ĉ"X^,«Ýþ÷wf�R¤$Û”âtóìi›D$.ƒÁ`€Ãï^¼?¹üéì%eÆc}xþöÍ 3ÌZíªyR«½¸|Áþçõ廷̪ÖÙeÈýÈ]és¯V{yj0cÇÁ~6™Lª“fU†ƒÚåyíaYXY?šq®fÕ‰£»qH
ÞŽ=?:ZÆÚÛÛSµ©¬àBÙw=‘•Œƒ•½íû5ËÂr‘ºAÌâi�Åbqe×>òe®R!ƒ±e²ëÿ©Ÿÿ›ýüëdà[5H¢áæÏ•ëHÄǶ-?®l³Ê‡c³µSïX³YùukYérÌ]ÿ”Vè‡BØ|@—ETõE¼¬ÐÄñ¸qÅ„
@‰Í~âÛH§Í-öa¼+„aÐu¤Œ…WíPðX¼ô¾mVTï*[aP¬Š=‡²•¹¾W(“GS߆Ü8LćÄ(ĤÍ
5Ú¯°£\Kž´9"SÒÇÒ–û–邵Zy¶¯ÞÕØU¶Ø?Y¥:rà “ÃXOc׎ª¶× ¥Qå ëR”ïÑ@ĺ;Ñóé% gû¹þ닪¡À©tDÕõ#ÆÏE_†bsÀ·YDäýsk©xXS5Æ"æÌahGÆÝþÔ¼±fK?PGÆsïõwßÿp|~qüÃèäöüÿžÄ?adOÆ/Þ½>9Ýù±w<=ÿÞúW²ûáÈ`5` »lŠß÷æÈ8QÀÌK |4
�²ï³‡<9úpùÊÜÕ`b7öD—±c(îI³7‘Ç}‡]Ä0´ìŒ‡#f²‹)°H‰mö!æCöoö
øŠ¤ŒuXSP�œçú#
ïȈâ©'¢¡±Á†¡èg³e'k“ÀÔèÖâ!P?ªñ1ÿÝõaæ�Ú5Uµ£èÛFݲêmkeù©9eÇåÐ,0¥ðuç¨â|É.ÐÓ@†ÀönlöìÖƒ 0a–9ûIèm®¨;†YÕz3…߬~0#þDf@lºyq/¡„N»ÃƒÀs«×Â(ú'¬J…Ä=2Š4gçì•΃ÔíC¡$×r�Hc¯¬
„]
Here is the header info:
HTTP/1.1 200 OK
Date: Thu, 30 May 2013 19:18:06 GMT
Server: Apache/2.2.24 (FreeBSD) mod_fcgid/2.3.6
X-Powered-By: PHP/5.4.13
Vary: Accept-Encoding,Cookie
Cache-Control: max-age=3, must-revalidate
WP-Super-Cache: Served supercache file from PHP
Content-Encoding: gzip
Content-Length: 10314
Last-Modified: Sun, 26 May 2013 15:32:28 GMT
Cache-Control: no-store, no-cache, must-revalidate, max-age=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
Can anyone help me with this? The same function works on a different site, so I’m assuming it is something with how their page is coded.
Thanks