Use cURL. This function is an alternative to file_get_contents function url_get_contents ($Url) { if (!function_exists('curl_init')){ die('CURL is not installed! '); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $Url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); return $output; }.
Use cURL. This function is an alternative to file_get_contents. Function url_get_contents ($Url) { if (!function_exists('curl_init')){ die('CURL is not installed!'); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $Url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); return $output; }.
Yes, if you have URL wrappers disabled you should use sockets or, even better, the cURL library. If it's part of your site then refer to it with the file system path, not the web URL. /var/www/..., rather than http://domain.
Tld/....
If you're trying to read XML generated from a URL without file_get_contents() then you'll probably want to have a look at cURL.
If you have it available, using curl is your best option. You can see if it is enabled by doing phpinfo() and searching the page for curl. If it is enabled, try this: $curl_handle=curl_init(); curl_setopt($curl_handle, CURLOPT_URL, SITE_PATH .'cms/data.
Php'); $xml_file = curl_exec($curl_handle); curl_close($curl_handle).
If the file is local as your comment about SITE_PATH suggest, it's pretty simple just execute the script and cache the result in a variable using the output control functions : function print_xml_data_file() { include(XML_DATA_FILE_DIRECTORY . 'cms/data. Php'); } function get_xml_data() { ob_start(); print_xml_data_file(); $xml_file = ob_get_contents(); ob_end_clean(); return $xml_file; } If it's remote as lot of others said curl is the way to go.
If it isn't present try socket_create or fsockopen. If nothing work... change your hosting provider.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.