I'm trying to scrape some data (not really scrape, but display better) from mls.ca. I can go to the url in my browser and it works perfectly. however, whenever i try to use file, file_get_contents, fopen, fsockopen, etc.. it either gives me access denied, or garbage (almost looks encrypted)
the url that i'm trying to grab (among others) is http://clientclick.mls.ca/PropertyResul ... &o=&Mode=1 if anyone can help me figure this out, i'd greatly appreciate it.
Btw, I AM able to display the same page inside an iframe perfectly, but it causes horiz scrolling, and that's not acceptable, i'd rather just popup a window...
fsockopen retrieves different data than browser
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
headers:Notice content-encoding, and utf8
Code: Select all
Server: Microsoft-IIS/5.0
Date: Sat, 13 Aug 2005 00:48:22 GMT
P3P: policyref="http://www.mls.ca/w3c/p3p.xml", CP=" NON COM NAV INT OTPa OUR STP DSP COR"
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Content-Encoding: deflate
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 2998
X-Cache: MISS from www.mls.ca
Connection: closeYou could try http://www.php.net/utf8_decode on the recieved string..