Hi,

in our school, downloading of music files,aqvis,mpeg, exes, zips are disallowed ,

since i know a bit of php , i wanted to know if i can initiate a download from some http address, using php, and after the file has downloaded into the web server, php renames the .zip to a image format like .jpg, and then i can download it directly from this webserver, since it bypasses the block in our school firewall.

(our firewall is not that sophisticated, just a cgi script that checks the file extension, and filters offensive words).

Is it possible? I know its possible to ftp connect , but what about plain http?

Thanks,

Ishwar :mrgreen:

even if you could it when php finds the files and downloads it windows will recognize it as w/e and not let you do it. You could just do like a save as like .txt open it with notepad and then save it as w/e extension it was before.

Schools, businesses and publicly accessible pc's have a firewall with restricted traffic streams on them for a reason - to stop abuse, reduce bandwidth and prevent virus infection. If you have a legitimate need to download files that have been blocked by the network admin, then the best thing to do is speak to the network admin.

Schools, businesses and publicly accessible pc's have a firewall with restricted traffic streams on them for a reason - to stop abuse, reduce bandwidth and prevent virus infection. If you have a legitimate need to download files that have been blocked by the network admin, then the best thing to do is speak to the network admin.

yes i know that , i'm just asking if its possible with php , knowledge is free.:confused:


Ishwar

even if you could it when php finds the files and downloads it windows will recognize it as w/e and not let you do it. You could just do like a save as like .txt open it with notepad and then save it as w/e extension it was before.

what do you mean windows will recogonize it?

the firewall is a linux with a stupid cgi script.


Ishwar

well I figured your school comp has windows on it and if your running a local script to fetch a file with a certain file extension it will still stop that file from being transfered to the script. Im no expert on this just try it out goto php.net and search some commands.

well I figured your school comp has windows on it and if your running a local script to fetch a file with a certain file extension it will still stop that file from being transfered to the script. Im no expert on this just try it out goto php.net and search some commands.

Hi , I think misunderstood my plans : here is a bit more detailed version:

  • get a web host with php,
  • create a php script that downloads files from other websites , eg. - it downloads http://www.samplesite.com/samplefile.exe, and it stores the file on the server
  • it renames samplefile.exe to samplefile.jpg
  • we can then download this file from the school, on demand from this webserver, since it passes the firewall extension check,
  • and voila, enjoy your file

oh yea I thought you meant locally run the script but yea that should work

Well , now the big problem comes,

How do I do it.

Ishwar

I believe you are under estimating the power of the stupid cgi script. Otherwise you would just need a stupid php script for your purpose which is just as stupid. :)

Take a look at the stream function section of the PHP manual on php.net
It has all you need, including changing the mime-type which is most likely what the stupid cgi script checks as an extension is meaningless to the http protocol.

yes i know that , i'm just asking if its possible with php , knowledge is free.:confused:


Ishwar

yes this is very possible with PHP, ASP, JSP

the only thing here is that not all web hosting companies will let you "access" files from another host (this is in case someone manages to hack your website and tries to get it to do malicious things to other computers)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.