How to read and display a HTML source from the website url?



How to read and display a HTML source from the website url?..

Answer / Himansh Upriyada Rsh

To read and display the HTML source of a web page in PHP, use the file_get_contents() function. For example: $html = file_get_contents("http://example.com"); echo $html;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

How is csrf token generated?

1 Answers  


Explain difference between urlencode and urldecode?

1 Answers  


What is beforeRender() used?

1 Answers   HCL,


Is php 7 backwards compatible?

1 Answers  


What are the difference between array_keys() and array_key_exists() in php?

1 Answers  


What is orm in php framework?

1 Answers  


Do you know what is php?

1 Answers  


What is "echo" in php?

1 Answers  


Single choice objective PHP question...

1 Answers  


Use of Session

6 Answers  


Explain converting an object?

1 Answers  


suppose if u want to pass session value using cookies onlu.. what changes i've to made in php.ini file?

1 Answers  


Categories