Jump to content
GIGN Forum

Server Script Pievienot Caur Web Bla Bla Bla


Recommended Posts

ūūūūBer kruts serveru pievienošanas web skripts

ūūūBer kruts protams ir pēdiņās..

Sāksim..

1.1 Novelkam lgsl
1.2 Pārdēvējam lgsl folderi par serveri.
1.3 Ejam iekšā mapītē serveri.
1.4 Izveidojam divus jaunus .php failus.
1.5 Pārdēvējam pirmo par server_add.php un otru par write.php .
....................................................................................
2.1 Iekopējam attiecīgos kodus katrā no failiem.. (skat. zemāk) ..
2.2 Atveram index.php failu.
2.3 Atrodam <?php un zem tā iekopējam šo te. - include "server_add.php";
....................................................................................
3.1 Atveram index.php failu.
3.2 atrodam
//-----------------------------------------------------------------------------------------------------------+


  $lgsl_cache_time       = 1;     // REFRESH DELAY IN MINS - AS GUIDE ADD 1 AFTER EVERY 30 SERVERS ON THE LIST
  $lgsl_hostname_shorten = 1;     // OPTIONS ARE 0 = DISABLED or 1 = KEEP LEFT PART or 2 = KEEP RIGHT PART
  $lgsl_hostname_length  = 40;    // NUMBER OF CHARACTERS ALLOWED BEFORE SERVER NAME GETS SHORTENED
  $lgsl_hide_offline     = 0;     // CHANGE THIS TO 1 IF YOU DONT WANT TO SHOW OFFLINE SERVERS
  $lgsl_hostname_to_ip   = 0;     // CONVERT HOSTNAMES TO IP ADDRESS TO SAVE SPACE AND FOR ASE LINK TO WORK

  $lgsl_path             = "";    // RELATIVE PATH BETWEEN THIS FILE AND THE LGSL FOLDER FOR PAGE INTEGRATION

//-----------------------------------------------------------------------------------------------------------+


3.3 Pārlabojam pa savam, domāju, ka problēmām nevajadzētu būt.
3.4 Atveram server_add.php.
3.5 Pā?labojam Rules pa savam.
................................................................................
4.1 Ievietojam images folderī loading.gif failu, meklējam caur gogoli..
4.2 Iemetam visu šo www mapē.
4.3 Dodamies uz localhost/serveri.
4.2 Iedzeram siltu tēju.
4.3 Uzrakstam kādu stūlbu komentāru.
4.4 Esam pabeiguši..

server_add.php

<html>
<head>
<title>=]</title>
<style type="text/css">
<!--
.style1 {
    color: #FF0000;
    font-weight: bold;
}
-->
</style>
<body>
<p><strong>Rules </strong></p>
<ul>
   <li>Maximum allowed hostname length is 30 characters</li>
   <li>You can add only Counter - Strike 1.5 - 1.6 servers</li>
   <li>Write just server ip and port whit out <strong>:</strong> </li>
   <li>Do not repeat </li>
</ul>
<div align="center" class="style1">
   <div align="left"> If server is offline it won't be showed on the list </div>
</div>
<center>

<form action="write.php" method="post">
<table width="200" border="0">
  <tr>
    <td>IP</td>
    <td>PORT</td>
    <td>?</td>
  </tr>
  <tr>
    <td><input type="text" name="sometext"></td>
    <td><input type="text" name="sometext2"></td>
    <td><input type='submit' name="Submit" value="Submit" ></td>
  </tr>
</table>
</form>
</center>
<BR>
</body>
</html>


write.php

<?php
$thedata = $_POST['sometext'].':'.$_POST['sometext2'] . ':halflife:on' . "\r\n";
$file = "lgsl_servers.txt";
$open = fopen($file, "a");
$write = fwrite($open, $thedata);
echo"
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<meta http-equiv='refresh' content='0;url=index.php' />
<title>Connecting</title>
</head>

<body>
<div align='center'><img src='images/loading.gif' width='400' height='400' align='bottom'>
</div>
</body>
</html>
";
?>


šitais ir ritīgs ūūūber kruts skripts! Bet nu iesācējiem noderēs..( gan jeu )


Iznākums aptuveni šāds..
serveralisteyu2.jpg Edited by MeTroiD
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...