Hello,
I am wondering how to create the User Login widget which can go on websites and/or forums?
If you could help that would be fantastic!
Thank You,
Chris
Printable View
Hello,
I am wondering how to create the User Login widget which can go on websites and/or forums?
If you could help that would be fantastic!
Thank You,
Chris
What widget O_O.
Basically it shows who logins into the game - Like on Terra, fine Terra has it but yeah its cool, it just auto refreshes when someone logs in.
i guess it refreshes every one second, donno if what you said is possibro.
You mean live logins.
I made the one for Sin, nothing fancy, just a quick job.
Would you be so kind to release it Bakey ^^? Much appreciated if you do :)!
Sorry, since I am a "shit dev", I don't feel good releasing it to other people because, it might have vulns in it.
Ok then :)! No problem. not gunna lose sleep over it O_o
dat vulns, So scary x.x I shall look into this! Although I doubt I'll figure it out xD.
K so, I made something really quick, based off of another script I found in the forums. Yea I don't know php... Also it takes character name instead of account name. It does work, just tested it.
PHP Code:<?php
// CONFIG
$odbc_host = '';
$odbc_user = '';
$odbc_pass = '';
// CONFIG END
echo '<h1><center>Last 5 players to log on</h1></center>';
$odbc_link = odbc_connect ( "Driver={SQL Server};Server=".$odbc_host.";Database=World00_Character;" , $odbc_user , $odbc_pass );
$sql[1] = 'SELECT TOP 5 nCharNo, sID, dLastLoginDate FROM tCharacter WHERE bDeleted = 0 ORDER BY dLastLoginDate DESC';
$rs[1] = odbc_exec ( $odbc_link , $sql[1] );
if ( !$rs[1] )
{
exit ( 'Error in SQL' );
}
$i = 1;
echo '<table width="100%">';
echo ' <tr>';
echo ' <td>';
echo ' <h3>#</h3>';
echo ' </td>';
echo ' <td>';
echo ' <h3>Name</h3>';
echo ' </td>';
echo ' </tr>';
while ( odbc_fetch_row ( $rs[1] ) )
{
$sID = odbc_result ( $rs[1] , 'sID' ); ;
$sID = str_replace ( 'ä' , 'ä' , str_replace ( 'Ä' , 'Ä' , str_replace ( 'ö' , 'ö' , str_replace ( 'Ö' , 'Ö' , str_replace ( 'ü' , 'ü' , str_replace ( 'Ü' , 'Ü' , str_replace ( 'ß' , 'ß' , $sID ) ) ) ) ) ) );
$nCharNo = odbc_result ( $rs[1] , 'nCharNo' );
echo ' <tr>';
echo ' <td>';
echo ' '.$i;
echo ' </td>';
echo ' <td>';
echo ' '.$sID;
echo ' </td>';
echo ' <td>';
echo ' </tr>';
$i++;
}
odbc_close ( $odbc_link );
echo '</table>';
?>
Completely wrong.