andreidumitrescu Posted September 30, 2009 Share Posted September 30, 2009 Hi, I have a page http://www.immoweb.be/nl/Buy.Estate.cfm?IdBien=2097088&xgallery=&xpage=1 I need the source code of the address "Dries 18 9420 Bambrugge".I tried the classic way but I see the IE doesn't show on the source this address. I see that if I open with mozilla firefox it gets the source, so I think there is a way to get it with php. Can someone show me how it's done. Thanks, Andrei Quote Link to comment Share on other sites More sharing options...
cunoodle2 Posted September 30, 2009 Share Posted September 30, 2009 View > Source ?? Quote Link to comment Share on other sites More sharing options...
andreidumitrescu Posted September 30, 2009 Author Share Posted September 30, 2009 yes I tried that but the address is not shown on source.probably there's a javascript generated page. Quote Link to comment Share on other sites More sharing options...
cags Posted September 30, 2009 Share Posted September 30, 2009 Holy crap, that site sure has a lot of whitespace in the HTML file. Getting the HTML should be as simple as something like this... Â $source = file_get_contents($url); Â The tricky bit will be working out exactly where in this code the address is. I don't suspect it will be too tricky using Regex, but as I don't speak... erm... dutch? I'm not entirely sure where on the page the address is, let alone in the HTML. Quote Link to comment Share on other sites More sharing options...
andreidumitrescu Posted September 30, 2009 Author Share Posted September 30, 2009 It seems that I get the same thing using your method. I write an echo after $source= file_get_contents($url);Â and I appears without the address on. Quote Link to comment Share on other sites More sharing options...
cags Posted September 30, 2009 Share Posted September 30, 2009 Hmm.. interesting. Your right it doesn't appear in the same place on the file. The same information is still in the source though. For example in multiple places in the source it has javascript code with zip=9420 in it. I don't know how the address work there, but this sound like the sort of thing your after extracting. Quote Link to comment Share on other sites More sharing options...
eatfishy Posted September 30, 2009 Share Posted September 30, 2009 use firefox browser and view source code. Quote Link to comment Share on other sites More sharing options...
andreidumitrescu Posted September 30, 2009 Author Share Posted September 30, 2009 yes,and how I'm going to get it from php? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.