You are here: Re: [PHP] file upload « PHP « IT news, forums, messages
Re: [PHP] file upload

Posted by Anirudh Dutt on 01/20/05 14:20

On Thu, 20 Jan 2005 12:26:07 +0100, Marek Kilimajer <lists@kilimajer.net> wrote:
> akshay wrote:
> > Hi all,
> > I hv problem while file upload.
> > I hv one server and multiple client.
> > I want to upload a file from Server to client.
> > how this is possible in PHP
>
> This is usualy called download. Is this what you want?

yeah. if that's what u're trying, check out the manual page on
fsockopen: http://php.net/function.fsockopen

the first example will give u an idea of what to do.

[code]
<?php
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Close\r\n\r\n";

fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
[/code]

the 02-Dec-2004 01:50 comment is also useful.

anirudh

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация