Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/06/2008, 16:09
Avatar de lexus
lexus
 
Fecha de Ingreso: enero-2002
Ubicación: Cali - Colombia
Mensajes: 2.234
Antigüedad: 23 años, 4 meses
Puntos: 4
convertir de PHP a ASP

hola
alguien sabe si se puede convertir este codigo de PHP a ASP?

gracias

Código PHP:
 
<?php
  
if ($_REQUEST["bindata"] === NULL) { 
    echo 
"missing parameter.";
  }
  else {
    
$img_data base64_decode($_REQUEST["bindata"]);
    
$name $_REQUEST["name"] === NULL "anonymous\n" $_REQUEST["name"] ."\n";
    
$name strip_tags($name);
    
$comment strip_tags($_REQUEST["comment"]) . "\n";
    
$img_size strlen($img_data);
    if (
$img_size 10000) {
      
$img_filename "data/snapshot.jpg";
      
$comment_filename "data/comment.txt";
      
unlink($img_filename);
      
unlink($comment_filename);
      
$img_file fopen($img_filename"w") or die("can't open file");
      
fwrite($img_file$img_data);
      
fclose($img_file);
      echo 
"$img_size bytes uploaded.";
      
// write comments
      
var_dump($comment);
      
$comment_lines explode("\r"$comment);
      
var_dump($comment_lines);
      
$comment_file fopen($comment_filename"w");
      
fwrite($comment_file$name);
      foreach (
$comment_lines as $line) {
        
fwrite($comment_file$line "\n");
      }
      
//fwrite($comment_file, $comment);
      
fclose($comment_file);
    }
    else {
      echo 
"image too big.";
    }
  }
  
//var_dump($_REQUEST);
?>
__________________
Control de Visitantes, Control de Accesos, Minutas digitales, Manejo de Correspondencia
http://www.controldevisitantes.com