Skip to content
Advertisement

download an xml file on the local machine without saving it (php)

i’m trying to build a php script that download an xml file with data from a db, the problem is trying to save it in the webserver and then download it dosen’t work cause i don’t have the permission “failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden” i was wondering if it was possible to build the xml file and force the download without saving it on the web server. looked around and tryed different method but no positive output came out i’m new to this kind of things (downloading file fromm a php page), tryed using readfile() but it just show the xml content on the page i’m using php but also js ajax or html is fine

the code:

JavaScript

Advertisement

Answer

found a way that apparently avoid that permission lock from altervista, only need to use html (don’t think it’s a good way to do it but it works)

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement