i was trying to download from an android application a php file stored onto my server.
From the application i call a webservices that have to give me in output the file .php
that i need.
On the web i found this that talk about which header set to download a file. It talks about
- zip
- jpg
- txt
Then i was thinking to develop something like:
- Application call ws to get a php page
- Ws zips the php file that application needs and give me in putput
- Application download the zip file and extract it.
This is a good solution but i was trying to find something better.
Another solution that is really like what i want is highlight_file
Just use it like:
echo highlight_file("myphpfile.php");
The problem is that in order to render good the file, the code is divided by many html tags and just "visually" is the same file but the source is really different.
Is there a way to download the file directly? Thanks! :)