0

ユーザーサーバーにインストールされるPHPスクリプトを書いています。MY リモート サーバー (zip ファイル) からファイルを取得し、スクリプトが実行されているローカル サーバーに書き込みたいと考えています。

file_get_contents と Snoopy を使用して、問題なく実行できます。

However, the issue is that my script will be distributed to lots of people who will have a variety of servers. They will range from freebie webspace to their own dedicated rack with everything in between :) I can't be certain that the correct options will be enabled for file_get_contents to work and I know that, if certain options are disabled, it will be unlikely that the user will be able to get them enabled.

So, I am thinking that, pretty much, the only thing I can guarantee is the they will have PHP 4 + what is the best way to pull the remote file - IE: Which way has the best chance of working on such a large range of webservers :

  1. file_get_contents
  2. Snoopy (using fetch)
  3. fsockopen

Any ideas or comments would be MUCH appreciated :)

4

0 に答える 0