How can I read the content of a file from a completely different server, then display the content. I will later change the code to use the returned information in th proper manner.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
file_get_contentsorcURL.Following example downloads the HTML of home page of google.com and shows it on screen.
file_get_contents way:
cURL way: