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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.