Newbie Spellweaver
- Joined
- Jun 10, 2007
- Messages
- 64
- Reaction score
- 0
Hi,
i have been browsing this forum quite a long time now and I figured out that a LOT of people asking for help for PHP scripts. All are like a simple account creator or password changer to include in their website.
So I have quickly written a package containing these functions:
Account creator (createacc.php)
Password changer (changepw.php)
Onlinelist with level and charname (onlinelist.php)
There also is a config.php.
For all those who don't know how to configure it well here is a little explanation:
Open config.php with an editor.
write your host, database, user and password between the ".
For example your database name is L2JDatabase
change this line
to
do so for all other configs aswell.
host is your database host most time it is "localhost"!
database: standard name of l2j is "l2jdb"
user: your database user !!!THIS NEEDN'T TO BE ROOT IF YOU WANT TO RUN IT ON A OPEN SERVER!!!
pw/password: enter the password of your above entered user
Thats it... Have Fun
Manus
PS: I'm currently working on a Dropcalculator for l2j based server... Hope to release it soon. until then...
EDIT:
Online Checker (simple)
Thanks to gosoft for the e107 plugin:
permalink : http://forum.ragezone.com/f323/php-essential-sites-for-l2j-based-servers-509171/#post4524584
i have been browsing this forum quite a long time now and I figured out that a LOT of people asking for help for PHP scripts. All are like a simple account creator or password changer to include in their website.
So I have quickly written a package containing these functions:
Account creator (createacc.php)
Password changer (changepw.php)
Onlinelist with level and charname (onlinelist.php)
There also is a config.php.
For all those who don't know how to configure it well here is a little explanation:
Open config.php with an editor.
PHP:
<?php
$L2J_config["mysql_host"]="localhost"; //your host
$L2J_config["mysql_db"]="l2jdb"; //your database
$L2J_config["mysql_login"]="root"; //your user
$L2J_config["mysql_password"]="root"; //your pw
?>
write your host, database, user and password between the ".
For example your database name is L2JDatabase
change this line
PHP:
$L2J_config["mysql_db"]="l2jdb"; //your database
PHP:
$L2J_config["mysql_db"]="L2JDatbase"; //your database
do so for all other configs aswell.
host is your database host most time it is "localhost"!
database: standard name of l2j is "l2jdb"
user: your database user !!!THIS NEEDN'T TO BE ROOT IF YOU WANT TO RUN IT ON A OPEN SERVER!!!
pw/password: enter the password of your above entered user
Thats it... Have Fun
Manus
PS: I'm currently working on a Dropcalculator for l2j based server... Hope to release it soon. until then...
EDIT:
Online Checker (simple)
PHP:
<?php
$serverLip="127.0.0.1";
$serverLport="2106";
$serverGip="127.0.0.1";
$serverGPort="7777";
$flogin = @fsockopen ($serverLip,$serverLport, $errno, $errstr, 1);
$fgame = @fsockopen ($serverGip,$serverGPort, $errno, $errstr, 1);
if ($flogin)
{
echo "Loginserver: <status style='color:#90bf00'>Online</status> | ";
}
else
{
echo "<status style='color:red'>Loginserver: Offline | </status> ";
}
if ($fgame)
{
echo "Gameserver: <status style='color:#90bf00'>Online </status>| ";
}
else
{
echo "<status style='color:red'>Gameserver: Offline </status>| ";
}?>
Thanks to gosoft for the e107 plugin:
permalink : http://forum.ragezone.com/f323/php-essential-sites-for-l2j-based-servers-509171/#post4524584
Attachments
You must be registered for see attachments list
Last edited: