Jump to content

Shout box


bibistroc

Recommended Posts

I have this script make on my own but i don`t like because when i write a line, the script write the line after last. I want the new lines to be write under the old lines.

 

<html>
<form action="write.php" method="get">
Text: <input type="text" name="text" />
<input type="submit" />
</form>
<iframe src=text.txt>
</html>

<?php

$your_data = $_GET["text"];

// Open the file and erase the contents if any
$fp = fopen("text.txt", "a");

// Write the data to the file
fwrite($fp, $your_data);

// Close the file
fclose($fp);

?>

Link to comment
https://forums.phpfreaks.com/topic/58055-shout-box/
Share on other sites

Look what I wanna do:

i have another script:

<?php
    $phpbb_root_path = './';
    define('IN_PHPBB', true);  
    if (!file_exists($phpbb_root_path . 'extension.inc'))  {     
        die ('<tt><b>Sorry!</b>        Phpbb root is wrong, please reconfigure</tt>');  
    }    
    include($phpbb_root_path . 'extension.inc');  
    include($phpbb_root_path . 'common.php');  
    include($phpbb_root_path . 'includes/bbcode.php');    
    $userdata = session_pagestart($user_ip, PAGE_INDEX);  
    init_userprefs($userdata);    
?>  

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
    <head>   
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  
        <META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">  
    </head>  
    <body bgcolor=white topmargin=50>  
        <!--login-->  
        <?php 
            if (!$userdata or !$userdata['session_logged_in'])  { 
                ?>    
                <table width="45%" align="left" cellpadding="1" cellspacing="1" border="0">   
                    <tr>    
                    <td>   
                        <form action="<?php echo $phpbb_root_path; ?>login.php" method="post" target="_top">  
                        <input type="hidden" name="redirect" value="../index.php">  
                        <input type="hidden" name="sid" value="<?php echo $userdata['session_id']; ?>">  
                        <input type="hidden" name="outside" value="1">  
                        Intra:<br><br>
                        Userul: <input type="text" name="username" size="15" maxlength="40">  <br><br>
                        Parola: <input type="password" name="password" size="15" maxlength="25">  <br><br>
                        <input type="submit" name="login" value="Intra">  
                        <input type="button" name="Register" value="Inregistreaza-te" onClick="parent.location='<?php echo append_sid($phpbb_root_path .  'profile.php?mode=register'); ?>'">  
                        </form>  
                    </td>  
                    </tr>  
                </table>  
                <br />  
                <br />  
                <?php 
            }   else  {
                ?>   
                <table width="45%" align="left" cellpadding="1" cellspacing="1" border="0">   
                    <tr>
                    <td> User:  <?php $userdata['username']?>
            }  ?>  
                    </td>  
                    </tr>  
                </table>  
        <!--login-->  
    </body>  
</html>

 

 

This script works with phpBB and i want to make a shoutbox on my site, and the name of people to be the user from phpBB forum.

 

I try to integrate this two script but it don`t works.

Please help.

Link to comment
https://forums.phpfreaks.com/topic/58055-shout-box/#findComment-288576
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.