I am trying to read an XML file from another server. However, the company that accepts me seems to have turned the file_get_contents function of extracting files for files from other servers (and their support is not very bright, and they always need to be answered). So I need work in some way.
This is my current code.
$url = urldecode( $object_list_url ); $xmlstr = file_get_contents ( $url ); $obj = new SimpleXMLElement ( $xmlstr, LIBXML_NOCDATA );
You can use cURL (if it is not disabled). Something like that:
$c = curl_init($url); curl_setopt($c, CURLOPT_RETURNTRANSFER, true); $xmlstr = curl_exec($c);
In ini var you mean allow_url_fopen. To check, run this script:
allow_url_fopen
var_dump(ini_get('allow_url_fopen'));
Ask your host to enable this ini value (if it is disabled, it is enabled by default).
URL- .
, copy . , ini, .
copy
Is it possible to execute the following script and provide the information as a comment?
<?php phpinfo(); ?>
Source: https://habr.com/ru/post/1698817/More articles:closing javascript and placing functions - performanceHow long have you cached resources on the client side? - cachingВнешняя производительность интерфейса: поиск некоторых лучших практик/советов - actionscriptHttpWebRequest over SSL? - c #Strange error creating Excel files using Spreadsheet_Excel_Writer - phpPaid support for web frameworks - web-frameworksHow to delete Excel rows in SSIS? - sql-serverWriting an analyzer - The need for guidance and research - parsingSubsonic: comparing two columns instead of an input parameter - .netThreading issues in Java HashMap - javaAll Articles