Jump to content
  • 0

[HELP] PHP !!


Question

Posted

Kalispera

 

8a i8ela an 3eri kapios na m dosi 1on ena guide pos mporw na sindesw tin db me ta static tou site m opos top pvp /top pk / online player / hero/ olympiad points / castle / Seige Date / Boss Status xwris diskw kai an exei kapios etima na m ta dosi an ginete h na mou dosete na guide pos ta ri8mizw !!!

 

 

12 answers to this question

Recommended Posts

  • 0
Posted

orea, as ipo8esoume oti sta arxeia tou site kaneis ena fakelo /config/ k mesa kaneis ena arxeio stats.php

k mesa grafeis auta:

<?php

   $db_user = "USER"; 
   $db_pass = "PSW"; 
   $db_name = "DATABASE"; 
   $db_serv = "SQL_SERVER"; 

   $res = mysql_connect ( $db_serv, $db_user, $db_pass ) or die ("Coudn't connect to [$db_serv]"); 
   $resdb = mysql_select_db ( "$db_name",$res ); 

   return $res; 

?>

ta siblirwneis opos prepei

eki 8a ine ta info gia na sindeode auta p 8a dixnoun ta stats me tin database

--------------------------------------------------------------------------------------------

meta, se opia selida valeis stats, 8a prepei na exis mesa auto to code(sto top):

<?php include "config/stats.php" ?>

kai auta:

<?php

mysql_connect($db_serv,$db_user,$db_pass) or die(mysql_error());

mysql_select_db($db_name) or die(mysql_error());

 

istera grafeis ti 8eleis na diavazei apo tin database

oriste merika paradeigmata:

//Total Accounts
$query = ("SELECT * FROM accounts WHERE accesslevel>=0");

$result = mysql_query($query) or die(mysql_error());

$acc2=mysql_numrows($result);

//GMs Online
$query = ("SELECT * FROM characters WHERE accesslevel=200 and online=1");

$result = mysql_query($query) or die(mysql_error());

$GM=mysql_numrows($result);

//Online Players
$query = ("SELECT * FROM characters WHERE accesslevel<=0 and online=1");

$result = mysql_query($query) or die(mysql_error());

$online=mysql_numrows($result);

//Total Characters
$query = ("SELECT * FROM characters WHERE accesslevel>=0");

$result = mysql_query($query) or die(mysql_error());

$char2=mysql_numrows($result);

//Total clans
$get_config_data="SELECT clan_id FROM clan_data";

$query = ("SELECT clan_id FROM clan_data WHERE clan_id>0");

$result = mysql_query($query) or die(mysql_error());

$clan2=mysql_numrows($result);

auta p ine stin teleutea seira ka8e code px sto "$clan2=mysql_numrows($result);" to clan2 ine to name m t opio 8a grafete to ka8eti sto file, auto to alazeis an 8es...

telos klineis to code tou connect me:

mysql_close();

mysql_connect($db_serv,$db_user,$db_pass) or die (mysql_error());

mysql_select_db($db_name) or die(mysql_error());
?>

 

k afou ine ola gramena, gia na di3eis px sto site tous total characters grafeis:

Total Characters: <?php print ("$char2"); ?>

(//Total characters(to script) 8a prepei na ine stin idia selida p 8a 8es na t di3eis, an ine alou apla vale eki p 8a ta dixneis ena:

<?php include "ToFilePouTaExeis.php" ?>

 

  • 0
Posted

lipon den skampazo mia apo php files kai tetia 8elo akrivos ayta edo  / top pvp /top pk / online player / hero/ olympiad points / castle / Seige Date / Boss Status / na dixni to site mou XORIS NA EXO DISKW kai den xero pos na to kano lipon mporis na mou ftiaxis gia arxi ena online player na to anixo na do pos to exis ftiaxi mpas kai ta katafero na ftiaxo kai ta ipolipa an den vglao akri kai etc 8a sou kano edo post... ayto ine eykolo na gini?

 

  • 0
Posted

pare gia online players

http://www.4shared.com/file/232887197/ec932b94/web.html

perasta ola mesa st site

ala3e kwdikous klp sto stats.php mesa sto confgi k meta perna t online-players.php opou 8es

an ta exis kanei swsta opou exis valei na dixnei to file 8a s dixnei:

Online Players: 1234  <-----oi online players

 

meta dn 8elei k pl mialo na ala3eis 2-3 pramata gia na dixnei ta hero, boss status ktl...

gia top pvp, pk 8a bei kapws etc

<?php 

function connect() 
{ 
include "config/stats.php";
}

$sexes = array('Male', 'Famale'); 
$online = array('0' => "<font color=#FF0000><b>OFFLINE</b></font>", '1' => "<font color=#035922><b>ONLINE</b></font>");
$klan = array('0' => "No Clan"); 

$FORM = "" ; 
$query_chars = "select char_name,level,sex,classid,pkkills from characters WHERE accesslevel=0 AND pkkills >= 1 order by pkkills desc limit 20;"; 
connect(); 
$link = mysql_query($query_chars); 
$i=1; 
$r=255; 
while ( $row=mysql_fetch_row($link) ) 
{ 
   $timer2=$row[4]/1000;
   $datetime2  = gmstrftime("%d.%m.%Y v %H:%M:%S", $timer2);
   $query = "select classname from char_templates where classid=$row[3]"; 
   $link2 = mysql_query($query); 
   $class = mysql_fetch_row($link2); 

   $FORM .= "<table><tr> 
   <td align=center><font color=#808080><b>  $i.</b></span></td>
   <td align=center><font color=#AE5C08>  $row[0]</td>
   <td align=center><font color=#808080><b>  Sex:</b></td>
   <td align=center><font color=#AE5C08>  ".$sexes[$row[2]]."</font></td>
   <td align=center><font color=#808080><b>  Class:</b></td>
   <td align=center><font color=#AE5C08>  ".$class[0]."</font></td>
   <td align=center><font color=#808080><b>  Pk:</b></td>
   <td class='Stil5' align=center><font color=#CC0099>  $row[4]</font></td><br>
   </tr></table>"; 
   $i++; 
   $r -= 0; 
}  

mysql_close(); 

echo $FORM; 

?>

 

PS: auto ine pio leptomeres, grafei k to filo k tin clan  tou char, to eixa ftia3ei palia k t ekana c/p

 

 

kai gia castle ine xese mesa diadikasia, akoma dn exw sini8isei p0s na to kanw swsta...

  • 0
Posted

Orea Os Edo Kai Kati Last Gia Na Katalavo

Edo ~~~ >    $db_serv = "Edo vazo px tin no-ip pia ip ? :S";

 

Sorry alla sou ipa ime asxetos apo ayta soz gia tin zalada

 

Kai edo pirazo kati Edo ~~~ >  $res = mysql_connect ( $db_serv, $db_user, $db_pass ) or die ("Coudn't connect to [$db_serv]");

   

i edo Edo ~~~ >  $resdb = mysql_select_db ( "$db_name",$res );

  • 0
Posted

Orea Os Edo Kai Kati Last Gia Na Katalavo

Edo ~~~ >     $db_serv = "Edo vazo px tin no-ip pia ip ? :S";

 

Sorry alla sou ipa ime asxetos apo ayta soz gia tin zalada

 

Kai edo pirazo kati Edo ~~~ >  $res = mysql_connect ( $db_serv, $db_user, $db_pass ) or die ("Coudn't connect to [$db_serv]");

   

i edo Edo ~~~ >  $resdb = mysql_select_db ( "$db_name",$res );

sto $db_serv vazeis tin ip stin opia ine i database, as ine k no-ip

sta ala dn alazeis tpt

 

xMrPwN to kaname me tn Calesty kai leei oti dn mporei na mpei stin ip. i ip tou server einai l2insanity.no-ip.org

exete tin port tou mysql (3306) anixti sto router k se exeption (TCP&UDP) sto firewall tou pc?

an nai

veveo8eite oti to user p exete valei den ine grameno stin database ws "localhost"

an nai kante to "%" i kante ena neo user me host "%"

 

PS: %=any host, gia pio sigekrimena an 8elete valte ti dieu8insi tou site sto user

 

 

EDIT: pos epitrepete tetia pramata sto forum??? http://l2insanity.gr/forum/index.php?showtopic=52

=|

  • 0
Posted

Lipon Gia Na Min Pedovo esena kai emena alla kiros esena mporis na knais ena guide na doume pos ginete gia na li8i to 8ema psistovo pos 8a voi8isi kai alla pedia mesa sto forum

 

 

EDIT: pos epitrepete tetia pramata sto forum??? http://l2insanity.gr/forum/index.php?showtopic=52

=|

li8ike apla mas exoun mamisi me ayta den ta prolavenoume ayto malon tin glitose

 

  • 0
Posted

Lipon Gia Na Min Pedovo esena kai emena alla kiros esena mporis na knais ena guide na doume pos ginete gia na li8i to 8ema psistovo pos 8a voi8isi kai alla pedia mesa sto forum

 

ebneusmenos ap tin periptosi s ekana ena guide me c/p auta p s eipa prin xP

anyway epd me petixes k se kali dia8esi addare xmrpwn sto skype ;]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • This post originally appeared on MmoGah. Odin: Valhalla Rising is an ambitious open-world MMORPG developed with Unreal Engine 4, offering breathtaking visuals and immersive gameplay. I will share everything you need to know before starting it.     Re-rolling In Odin, re-rolling isn't a practical strategy. Unlike most gacha games, where it's common to reset for better initial pulls, Odin focuses heavily on long-term growth. The earlier you begin playing and developing your character, the more advantages you'll gain over time. Instead of spending your efforts on re-rolling for ideal equipment, it's better to dive in and start progressing right away.   Server Selection Before starting your character, selecting a server is a crucial step. Since Odin doesn't support cross-server gameplay, coordinating with your friends, family, or guildmates is essential to ensure everyone creates their characters on the same server. Take the time to plan with your group beforehand. After deciding on a server, your next major choice will be picking a class.   Class Breakdown Odin features four primary starting classes: Warrior, Sorceress, Rogue, and Priest. Each class comes with its own distinct playstyle and unique strengths, so choose wisely, as your selection is permanent. However, even free-to-play players can create up to three characters on one server, giving you the flexibility to try different options and find the one that matches your preferences.   Quest and Leveling Once your character is created, your initial objective is to work through the main questline. This acts as both a tutorial and a method for early leveling. Odin simplifies the process with a convenient quest button that handles navigation, starts dialogues, and even enables auto-combat. This user-friendly feature allows beginners to grasp the basics of the game without feeling overloaded.   Auto Combat and No Kill-steal Mode Auto combat is an essential feature in Odin, enabling your character to battle monsters autonomously. This system allows you to effortlessly gain experience and loot, even while you're busy studying, cooking, or unwinding. To optimize its use, activate the no-kill-steal mode. This setting prevents your character from targeting monsters already engaged by other players, helping you avoid conflicts or potential PvP situations. However, if a quest becomes difficult to complete due to overcrowded areas, you can temporarily disable this mode to overcome the obstacle and move forward.   Item Management and Potions Don't overlook the importance of consumable items, especially health potions. These can be purchased, along with buffs, from general merchants in villages, and they play a crucial role in improving your combat efficiency and ensuring your survival. Always aim to keep a full stock of HP potions and carry buffs that boost attack, defense, or regeneration in batches of 5-10 for convenience.   Once you've acquired your consumables, assign them to your quick slots located at the bottom center of the screen. Swiping down activates these slots, and items like potions will automatically be used when necessary, so you don't need to worry about them mid-battle. Keep a close eye on your potion reserves, as running out during a tough fight could leave you vulnerable before reaching a safe area. In the early stages of the game, it's better to return to town for a restock if supplies are low rather than risking unnecessary defeats. You can also enable notifications to alert you when your health or potion count drops too low—a handy feature for staying prepared if your attention is elsewhere.   Leveling and AFK Farming Once you've mastered the fundamentals, the next step is to focus on leveling up and enhancing your character. Gaining levels is your primary source of progression early on, as it not only improves your stats but also unlocks crucial game features and new abilities. At this stage, simply sticking to the main questline provides a reliable and efficient way to gain experience.   Additionally, Odin includes a highly convenient idle feature called AFK mode. This allows your character to keep farming for resources and experience even when the game is closed, with a maximum duration of 8 hours per day. It's an excellent option for making progress while you're asleep, commuting, or otherwise occupied.   Gear Upgrades When the time comes to improve your gear, the initial focus should be on upgrading from normal-grade equipment to high-grade items. These provide significantly better stats and can be enhanced further to increase their effectiveness. Enhancing requires enhancement stones and gold, but it's important to stay within the safe enhancement limit. Attempting upgrades beyond this limit carries the risk of destroying your gear if the enhancement fails. Stick to safe enhancements until you've gained more experience and accumulated spare equipment to mitigate potential losses.   Skill Purchases When you've accumulated enough gold, it's time to invest in skills. These are crucial for enhancing your combat abilities and provide key benefits tailored to your class, whether it's increasing damage output, improving healing capabilities, or adding valuable utility. Before purchasing, ensure your character meets the level prerequisites for each skill. Your ultimate goal will be progressing through and completing the main questline in Midgard as you continue to develop your character.   Unlocking Jotenheim Finishing this milestone grants you access to the next region, Jetunheim, unlocking a variety of new content and challenges. This marks your first significant achievement in the game and is an essential early objective to strive for as you progress.   Joining a Guild Joining a guild is a highly beneficial step in Odin. Guilds not only provide opportunities for social interaction and group activities but also offer passive bonuses that can significantly enhance your gameplay. Even if you're not particularly active socially, being part of any guild is advantageous. The guild feature becomes accessible after completing Chapter 4, Quest 19 of the main story.   Guilds provide various perks, including buffs that scale with the guild's level. Additionally, you can earn guild coins by contributing through donations, quest completions, or regular logins. These coins can be exchanged for valuable rewards, such as epic-grade armor. The more you actively contribute to your guild, the greater the overall benefits for both you and the guild itself. Joining early and staying involved will undoubtedly strengthen your progression in the game.   Conclusion Here is the end of this beginners' guide. I hope these tips will help you level fast in Odin.
    • You can actually make a pseudomount code in your server, that way it can be displayed.. a friend made it for the l2off and i extended it a bit.. if u have l2off i might be able to help u on that
    • Discord : utchiha_market Telegram : https://t.me/utchiha_market Auto Buy Store : https://utchihamkt.mysellauth.com/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt
    • Chill guys, Guytis ain't competent enough to make malware even if he wanted to
  • Topics

×
×
  • Create New...