Webaluc Posted March 23, 2021 Share Posted March 23, 2021 Hi PHP folks! I was wondering if PHP could provide a solution to this Javascript problem?https://w3schools.invisionzone.com/topic/62750-unable-to-read-a-xml-file-hosted-on-an-external-web-server/ Thank you! Link to comment Share on other sites More sharing options...
Ingolme Posted March 23, 2021 Share Posted March 23, 2021 You can use the cURL library to request data from any server. This example comes from the PHP manual page for curl_exec(): <?php // create a new cURL resource $ch = curl_init(); // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); ?> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now