Anyone know how to get HTML code from the URL in php?

Recommended Answers

All 4 Replies

Hi, please be more specific ...

- Mitko Kostov

For example: In my php code, I want to get HTML from one specific website to do some analyzing... like $html = gethtml('www.daniweb.com') or $html = gethtml('www.google.com') something like that.... Hope you understand what I am trying to do...

You could also use file_get_contents()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.