file_get_contents alternative ????? Please answer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
getmypage
Forum Newbie
Posts: 2
Joined: Tue May 15, 2007 9:47 pm

file_get_contents alternative ????? Please answer

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Configure the "other" server to use something like mod_deflate or let the script run there, locally.
getmypage
Forum Newbie
Posts: 2
Joined: Tue May 15, 2007 9:47 pm

Thank you for rhe reply

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Well, the answer then is "no, you can't make an arbitrary server execute your code just like this".
Post Reply