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
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>';
?>
Last edited by hamisgood87; 26-07-12 at 01:38 AM.
Completely wrong.
1. That's character logins, not account logins.
2. That won't auto-refresh.
3. You're not caching so you're going to put a lot of stress on your server, doing query-per-second for every person viewing the page (After you get the refresh part fixed).
4. The code is just plain out messy, I could sit here and point out things that are bad practice.
Thanks for letting me know Terra's didn't work, forgot about it c: Fixed -*-*
And btw, you could just look at T's html source and pretty much figure out how it was done.
http://tll2.extrinsicstudio.com
Last edited by Gruntilda; 26-07-12 at 02:23 AM.
#1 I think i said that for it being character.
#2 yea true.
I shall do that after looking into it!...cause I just have no idea.
I don't know php and i pretty much just copied somebody else's code for something else and changed a few things.
Last edited by hamisgood87; 26-07-12 at 02:45 AM. Reason: I can't count.
late again... We all already see that.
ok i have to say this Bakey who in there right mind said your "shit Dev" i would like to know this cause truthfully that person needs to take a .357 load it insert in there mouth and pull the trigger cause i know that you are not a "shit Dev" bakey your one of the best out there so i think someone is a complete retard and the world would be better off with out that person in it but yeah im sorry someone said that to you bakey
Ceila did, on another forum. Things get around though, you know?
well bakey what i said is fact and he is just gonna have to deal with the fact that anyone who knows anything knows that you are a much better dev than ceila on one of ur bad days and ceila can go fuck him or herself cause i know u do so much better and ceila is just mad cause you wont teach the knowledge to him or her so ceila can go right on hating because we all know bakey haters will hate so i say this "fuck you ceila u wanna rag on someone rag on a noob like me dont lie about ppl who are better than you at developing"
lol - I never said I could dev ^^? So basically it doesn't really affect me saying I can't dev. Anyhow I wont lie I did say Bakey is a shit dev; but that is just for Fiesta. Not things like PHP, or such. I haven't really seen any of Bakey's PHP or SQL work so I can't judge that, but from Dusk work he did; I didn't really like it, thought it was pretty crap. So josh please Don't get involved which shit you don't know about thx.
I would publicly like to apologise to you Bakey if this really made offended.