Jump to content
  • 0

L2 Site Script


Ma3x*

Question

Paidia mpori kapios na me boh8isei me ena mono script gia n  mporw meta na ta kanw monos m?

 

p.x

Auto to script ti 8a alla3w k pou 8a to anebasw gia na douleuh??

Einai gia ta top 10 player..To brika apo ena site p ekana download.

 

 

 

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

Exo kanei ena guide pou sou leei to pos na kaneis add + edit ta arxeia gia to website sou.

 

An psakseis , tha to breis . ' how to edit your website using ftp client '

 

Sto meros pou lew pos na baleis ta arxeia sto website sou , esy bazeis auta ta php scripts.

 

PS : Prepei na kaneis edit ta configs , gia na mporei na sindethi me ton server sou. Mysql ktlp.

Link to comment
Share on other sites

  • 0

Exo kanei ena guide pou sou leei to pos na kaneis add + edit ta arxeia gia to website sou.

 

An psakseis , tha to breis . ' how to edit your website using ftp client '

 

Sto meros pou lew pos na baleis ta arxeia sto website sou , esy bazeis auta ta php scripts.

 

PS : Prepei na kaneis edit ta configs , gia na mporei na sindethi me ton server sou. Mysql ktlp.

Wraia file 8a to psa3w..

Pirazei p o server einai se allo pc k to script se allo?

dld prepei n einai k ta 2 se ena?

Link to comment
Share on other sites

  • 0

Wraia file 8a to psa3w..

Pirazei p o server einai se allo pc k to script se allo?

dld prepei n einai k ta 2 se ena?

 

Einai kalitero na exeis kai to site + ton server se ena pc.

 

Allios an exeis ton server kai to site se diaforetika pc , tha xriasteis ena allo php script to opoio tha sindeei to site me ton server sou. ( bazontas ip's etc. )

Link to comment
Share on other sites

  • 0

Ok file..

Exw auto to code...

<?php

//first you need to define db info

 define('mySQL_hostname', '127.0.0.1'); pws 8a dw to hostname apo to mysql?  //database IP

 define('mySQL_database', 'Database');pws 8a dw to onoma apo tin database?? //database name

 define('mySQL_username', 'User')To user einai root?;  //database user

 define('mySQL_password', 'Pass') ean dn exw kodiko ti bazw??;  //database password

 

//connects to mysql

 $db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password )

   or die( 'Error connecting to mysql<br><br>'.mysql_error() );

 

//connects to Database

 $db_select = mysql_select_db( mySQL_database, $db_link )

   or die( 'Error connecting to Database<br><br>'.mysql_error() );

 

//selects desired table

  $chars=mysql_query("SELECT * FROM characters");

 

//tells how much rows are there (will come helpfull with while loops)

  $rows =mysql_numrows($characters);

 

  $i=0;

  $x=0;

 

//while $i is smaller than number of rows repeat the code

  while ($i < $rows) {

   $online=mysql_result($chars,$i,"online"); //looks into characters table, under column online(if player is online its "0" else "1"), at row $i

   if ($online == 1) { $x++; } // if column online at row $i is "1", increase $x

   $i++; //increase $ia

   }

  print 'Online players:<em>'.$x.'<em>'; //prints out the $x number of players online

?>

Auto to code pws 8a to fria3w dld 8a ani3w ena notepad k 8a to kanw c/p??

Pws mporo na brw script..?Search---> Site script??

Link to comment
Share on other sites

  • 0

To mySQL hostname eine localhost.

 

To onoma tis database sou tha to breis apo navicat.

 

To username tis db eine sinithos root.

 

An den exeis password , den bazeis tipota.

Link to comment
Share on other sites

  • 0

File akoma kt pws to ftiaxno anige notepad k c/p?

To onoma tis database dld l2jdb?

 

Notepad i wordpad . Oti se boleuei.

 

An exeis auto to onoma gia database , nai.

Link to comment
Share on other sites

  • 0

Kai meta anigw smartftp k to bazw mesa ekei?

 

Nai . Kserontas omos prota pos na ta kaneis install . Den ta bazeis opou thes.

Link to comment
Share on other sites

  • 0

:S:S mesa sto guide s ta leei auta?

 

Einai to idio . Kai ta arxeia enos template .php einai.Min agxonesai kai tha ta katafereis.

 

Request to lock.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...