php - saving and reading a xml file getting from the other url -
Maybe I'm going to ask some stupid questions but I have no information about php, so I want to know I have never worked in PHP and now I have to do this, please give me some useful tips, I have an XML file coming from a different URL and if I want to save it on the server then I have to read it and it Must be removed in the appropriate format
You
$ dom = New DOMDocument () can be used; $ Dom- & gt; Load ('http://www.example.com');
This will load the XML from the remote URL, after which you can process it as needed to save it to your server after processing the file, you
$ Dom- & gt; Use Save ('filename.xml');
$ dom- & gt; Loading a file with load ()
will only work if you have enabled it in your php.ini. If not, then you have to use it first.
Comments
Post a Comment