Webaluc 0 Posted March 23 Report Share Posted March 23 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! Quote Link to post Share on other sites
Ingolme 1,035 Posted March 23 Report Share Posted March 23 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); ?> Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.