<$BlogRSDUrl$>

martes, octubre 26, 2004

WEBCACHE: El futuro de eMule!!!!! :: Razorman.net :: Hardware, Software, Internet. Programas P2P.Tutoriales y Trucos Windows 

WEBCACHE: El futuro de eMule!!!!! :: Razorman.net :: Hardware, Software, Internet. Programas P2P.Tutoriales y Trucos Windows

WebSecurenet Seguridad - download keyloggers 

WebSecurenet Seguridad - download keyloggers

viernes, octubre 22, 2004

Grupos Google: Ver secuencia "File upload script working, but ..." 

function SendFileToHost($host,$path,$name,$filepath, $test_file="")
{
/*
$host : host name, i.e. www.macrospit.com
$path : path at host i.e. /upload.php
$name : identifier for file, usually the file name.
$path : full path to the file, i.e. /usr/home/mine/test.jpg
$test_file : if present, output will be directed to this file
instead of to a socket.
*/
$boundary = "idahofalls".md5(uniqid(microtime()));
$content_type = "text/plain";
$filename = basename($filepath);

$body_head = "--$boundary\r\n";
$body_head .= "content-disposition: form-data; name=\"$name\";
filename=\"$filename\"\r\n\r\n";

$body_end = "--$boundary--\r\n\r\n";

$body_length = strlen($body_head) + filesize($filepath) +
strlen($body_end);

$header = "POST $path HTTP/1.0\r\n";
$header .= "Host: $host\r\n";
$header .= "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,"
."application/msword, application/vnd.ms-excel,"
."application/vnd.ms-powerpoint, */*\r\n";
$header .= "Content-type: multipart/form-data, boundary=$boundary\r\n";
$header .= "Content-Length: $body_length\r\n";
$header .= "\r\n";

if ($test_file == ""){
// we will write to the host through a socket
if (!$fpw = fsockopen($host,80)) {
echo "failed to open socket for $host:80
\n";
return;
} echo "socket opened for $host:80
\n";
} else {
// we will write to a test_file
if (!$fpw = fopen($test_file, "w")) {
echo "failed to open test_file $test_file
\n";
return;
} echo "test_file $test_file opened
\n";
}
// write the header and the first part of the body
fwrite($fpw, $header.$body_head, strlen($header.$body_head));

// read and write the file we are uploading
if ($fpr = fopen("$filepath", "r")){
echo "upload file opened
\n";
while (!feof($fpr)) {
fwrite($fpw, fread($fpr, filesize("$filepath")), filesize("$filepath"));
}
fclose($fpr);
echo "file data complete
\n";
}
// write the final part of the body
fwrite($fpw, $body_end, strlen($body_end));


echo "waiting for response
\n";
while (!feof($fpw))
$buf .= fgets($fpw,128);
fputs($fpw, "Connection: Close\n");
fclose($fpw);
return $buf;

}
echo "\n";
echo (SendFileToHost("localhost", "/test2.php","zip", "C:Documents and
Settings/Alan/Desktop/downloads/php_ch5.zip"));
echo "\n";
?>

----------------------------------
test2.php ---------------------------------
// In PHP earlier then 4.1.0, $HTTP_POST_FILES should be used instead of
$_FILES.
$save_path = "D:/uploads";
echo "";
$i = 1;
echo "

Values in the \$_POST Array

";
while (list($key, $value) = each($_POST)){
echo "$i: $key = $value
\n";
if (is_array($value) ){
$ii = 1;
while (list($k1, $value) = each($_POST[$key])){
echo "... $i.$ii: $k1 = $value
\n";
$ii++;
}
} $i++;
}
echo "

Values in the \$_FILES Array

";
$i = 1;
//while ($element = each($HTTP_POST_FILES[ip_txt])){
while (list($key, $value) = each($_FILES)){
echo "$i: $key = $value
\n";
if (trim($value) == "Array"){
$ii = 1;
while (list($k1, $value) = each($_FILES[$key])){
echo "... $i.$ii: $k1 = $value
\n";
switch ($k1){
case "name":
$fname = $value;
break;
case "tmp_name":
$ftemp = $value;
break;
case "error":
$ferror = $value;
break;
default:
} if (!$ferror) {
} $ii++;
}
$outfile = "$save_path/$fname";
echo "... (" .filesize($ftemp) ." bytes) $ftemp moved to
.../uploads/$fname
\n";
move_uploaded_file($ftemp,$outfile);

} $i++;
}
echo "";
?>



Grupos Google: Ver secuencia "File upload script working, but ...": "function SendFileToHost($host,$path,$name,$filepath, $test_file='')
{
/*
$host : host name, i.e. www.macrospit.com
$path : path at host i.e. /upload.php
$name : identifier for file, usually the file name.
$path : full path to the file, i.e. /usr/home/mine/test.jpg
$test_file : if present, output will be directed to this file
instead of to a socket.
*/
$boundary = 'idahofalls'.md5(uniqid(microtime()));
$content_type = 'text/plain';
$filename = basename($filepath);

$body_head = '--$boundary\r\n';
$body_head .= 'content-disposition: form-data; name=\'$name\';
filename=\'$filename\'\r\n\r\n';

$body_end = '--$boundary--\r\n\r\n';

$body_length = strlen($body_head) + filesize($filepath) +
strlen($body_end);

$header = 'POST $path HTTP/1.0\r\n';
$header .= 'Host: $host\r\n';
$header .= 'Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,'
.'application/msword, application/vnd.ms-excel,'
.'application/vnd.ms-powerpoint, */*\r\n';
$header .= 'Content-type: multipart/form-data, boundary=$boundary\r\n';
$header .= 'Content-Length: $body_length\r\n';
$header .= '\r\n';"

Practical PHP Programming 

Practical PHP Programming

jueves, octubre 07, 2004

DivXPort.Com Tu Comunidad BT y BoB, bittorrent emule bobdown warez juegos programas full appz divx xvid gamez musica full albums mp3 torrents elinks f 

DivXPort.Com Tu Comunidad BT y BoB, bittorrent emule bobdown warez juegos programas full appz divx xvid gamez musica full albums mp3 torrents elinks ftps ftp adult xxx sexo vcd cvcd dvd dvdr peliculas programs

ForoDivX -> Foro -> Archivo -> Xvid a tironcillos en DVP-720SA MPEG4Modifier 

ForoDivX -> Foro -> Archivo -> Xvid a tironcillos en DVP-720SA

martes, octubre 05, 2004

Web.FriendsFactory.com 

Web.FriendsFactory.com

lunes, octubre 04, 2004

- EL MUNDO | Suplemento de Viajes 31 - Dubl�n, seg�n Joyce 

- EL MUNDO | Suplemento de Viajes 31 - Dubl�n, seg�n Joyce

This page is powered by Blogger. Isn't yours?