Jump to content

Get source of a page


andreidumitrescu

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/176095-get-source-of-a-page/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/176095-get-source-of-a-page/#findComment-927892
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/176095-get-source-of-a-page/#findComment-927899
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.