Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Loading PHP in Flash: can PHP hold color statements?
Old 12-06-2005, 11:30 PM Loading PHP in Flash: can PHP hold color statements?
Junior Talker

Posts: 1
Trades: 0
Hello, there.
I'm developing a chat based on PHP, that will run on Flash. In the message screen, I would like to set different colors to nickname and message. Below follows the script:

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

<?
$nickname = str_replace ("\n"," ", $nickname);
$nickname = str_replace ("<", " ", $nickname);
$nickname = str_replace (">", " ", $nickname);
$nickname = stripslashes ($nickname);
?>

&output=
<?
$chat_file = "chat.txt";
$chat_lenght = 40;
$max_single_msg_lenght = 100000;
$max_file_size = $chat_lenght * $max_single_msg_lenght;
$file_size= filesize($chat_file);
if ($file_size > $max_file_size) {
$lines = file($chat_file);
$a = count($lines);
$u = $a - $chat_lenght;
for($i = $a; $i >= $u ;$i--){
$msg_old = $lines[$i] . $msg_old;
}
$deleted = unlink($chat_file);
$fp = fopen($chat_file, "a+");
$fw = fwrite($fp, $msg_old);
fclose($fp);
}
$msg = str_replace ("\n"," ", $message);

$msg = stripslashes ($msg);
if ($msg != ""){
$fp = fopen($chat_file, "a+");
$fw = fwrite($fp, "$nickname: $msg\n");
fclose($fp);}
$lines = file($chat_file);
$a = count($lines);
$u = $a - $chat_lenght;
for($i = $a; $i >= $u ;$i--){
echo $lines[$i];
}

?>

Is it possible to attribute a color to:

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

so the nickname gets grey, while the msg gets white?

On Flash, the entire text field (that loads chat.txt) has a specific color (white). Is it possible to manage different colors inside the PHP script, so it ignores the Flash statements and stablishes different colors for different tags?

I hope I´ve been clear.
Thanks a lot for your attention.
Best regards,
F. Almeida
mocoroh is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Loading PHP in Flash: can PHP hold color statements?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11245 seconds with 12 queries