Page 1 of 1

file_get_contents alternative ????? Please answer

Posted: Tue May 15, 2007 9:58 pm
by getmypage
I am using file_get_contents to download HTML file from a website(s), but some of them are big and in that process I am wasting my bandwidth. I want to know that how do I open a HTML file remotely on that server itself without downloading it on my system?
Then I have an algorithm to compress the code file there itself.
And then how do I download that compressed file (which I will probably store in a variable) to my system. This way I will make my download consume lesser bandwidth.

Please answer my two questions. Thank you

Posted: Tue May 15, 2007 10:47 pm
by volka
Configure the "other" server to use something like mod_deflate or let the script run there, locally.

Thank you for rhe reply

Posted: Wed May 16, 2007 9:32 am
by getmypage
I wanted to just open the file there and compress that file with my own algorithm(not any zip format etc) which I can say is the best in the world and I created it(I will also have it patented). I was just wondering if I can use mix of cookies, javascript, and PHP.
Anyhow, thank you for the reply. I will keep trying on it and inform you people of any success. Also, if u find any other ways just let me know.
Thank you

Posted: Wed May 16, 2007 9:50 am
by volka
Well, the answer then is "no, you can't make an arbitrary server execute your code just like this".