Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

andrew_qz

Converter PHP para ASP

Recommended Posts

Queria converter um arquivo PHP para ASP será que alguem sabe de um programa, ou se puder converter pra mim agradeço....

 

<?

header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");

header("Cache-Control: no-cache, must-revalidate");

header("Pragma: no-cache");

?>

<?

/* Shockwave Flash Chatengine. */

/* If you are using this chat, please send me an email */

/* to <joost@extrapink.com> This script is free and may*/

/* be edited at own risk. I hope you like it :-) */

/* http://www.neo-ego.com */

/* Original script by Nicola Delbono <key5@key5.com> */

?>

 

<?

 

$person = str_replace ("\n"," ", $person);

$person = str_replace ("<", " ", $person);

$person = str_replace (">", " ", $person);

$person = stripslashes ($person);

 

?>

 

&output=

 

<?

/* Change this to your filepath. The chat will not work if this */

/* is not changed. */

 

$chat_file_ok = "msg.txt";

 

 

 

 

 

 

 

 

 

 

/* $chat_lenght is the number of messages displayed. (Optional, see Readme.txt) */

 

$chat_lenght = 13;

 

/* $max_file_size is the maximum file size the msg.txt file can reach */

/* assuming that any chatter doesn't write a message longer than */

/* $max_single_msg_lenght (Optional, see Readme.txt) */

 

$max_single_msg_lenght = 100000;

$max_file_size = $chat_lenght * $max_single_msg_lenght;

 

 

 

/* ANYTHING BELOW THIS DOES NOT NEED TO BE MODYFIED */

 

$file_size= filesize($chat_file);

 

/* if file size is more than allowed then */

/* reads last $chat_lenght messages (last lines of msg.txt file) */

/* and stores them in $lines array */

/* then deletes the "old" msg.txt file and create a new msg.txt */

/* pushing the "old" messages stored in $lines array into the */

/* "new" msg.txt file using $msg_old. */

/* Note: this is done in order to avoid huge msg.txt file size. */

 

if ($file_size > $max_file_size) {

 

/* reads file and stores each line $lines' array elements */

 

$lines = file($chat_file_ok);

/*get number of lines */

 

$a = count($lines);

 

$u = $a - $chat_lenght;

for($i = $a; $i >= $u ;$i--){

$msg_old = $lines[$i] . $msg_old;

}

$deleted = unlink($chat_file_ok);

$fp = fopen($chat_file_ok, "a+");

$fw = fwrite($fp, $msg_old);

fclose($fp);

}

 

/* the following is because every message has to be */

/* placed into one single line in the msg.txt file. */

/* You can render \n (new lines) with "<br>" html tag anyway. */

 

$msg = str_replace ("\n"," ", $message);

 

/* if the user writes something... */

/* the new message is appended to the msg.txt file */

/* REMEMBER: the message is appended, hence, if */

/* you want the last message to be displayed as the */

/* first one, you have to */

 

/* 1. store the lines (messages) into the array */

/* 2. read the array in reverse order */

/* 3. post the messages in the output file (the chat) */

 

/* I added these three lines in order to avoid buggy html code and slashes */

$msg = str_replace ("\n"," ", $message);

$msg = str_replace ("<", " ", $msg);

$msg = str_replace (">", " ", $msg);

$msg = stripslashes ($msg);

 

 

 

 

if ($msg != ""){

$fp = fopen($chat_file_ok, "a+");

$fw = fwrite($fp, "$person : $msg\n");

fclose($fp);}

 

$lines = file($chat_file_ok);

$a = count($lines);

 

$u = $a - $chat_lenght;

 

/* reads the array in reverse order and outputs to chat */

for($i = $a; $i >= $u ;$i--){

echo $lines[$i];

}

 

 

?>

Compartilhar este post


Link para o post
Compartilhar em outros sites

olá,se tem algum programa que faz isso desconheço. O normal é encontrar de ASP p/ PHP. o inverso eu ainda nao encontrei, nessas alturas quem sabe, pode ate´existir em algum buraco na net. mas é dificil.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Se eu não me engano esse domínio foi comprado ou está a venda, existe outra forma de conseguir esse conversor?Achei um que faz pra ASP.NET, mas eu queria para ASP mesmo.Nesse link tem o PHP2ASPNET:http://www.asp.net/migrationassistants/php2aspnet.aspxAchei também um site que te permite traduzir de PHP para ASP no próprio site:http://www.me-u.com/php-asp/

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.