Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Script] Total User Online by phprap^^

Junior Spellweaver
Joined
Mar 5, 2007
Messages
177
Reaction score
109
INDEX TOP

PHP:
<?
include("config_cabal.php");
?>


Codigo php

PHP:
<?php 
$sql = mssql_query("SELECT count(*) FROM cabal_character_table WHERE Login = 1");

if( mssql_result($sql, 0, 0) <= 80){
echo "<font color=red>";
echo mssql_result($sql, 0, 0);}

elseif( mssql_result($sql, 0, 0) >= 80 AND mssql_result($sql, 0, 0) <= 150){
echo "<font color=Blue>";
echo mssql_result($sql, 0, 0);}

elseif( mssql_result($sql, 0, 0) > 150){
echo "<font color=green>";
echo mssql_result($sql, 0, 0);} ?>


config_cabal.php


PHP:
<?php
//===== Script criado por phprap edite conforme seus dados ======
$dbhost = "127.0.0.1"; // ip host geralmente "127.0.0.1"
$dbuser = "sa"; // login sql "sa"
$dbpasswd = "XXXXXX"; // senha do sql
$host = "127.0.0.1"; // ip de onde est
 
Last edited:
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
Dont work for me.. i go to codigo and i see:

<?
include("config_cabal.php");
?>
<?php
$msconnect=mssql_connect("$dbhost","$dbuser","$dbpasswd");
$msdb=mssql_select_db("GAMEDB",$msconnect);
?>
<?php
$sql = mssql_query("SELECT count(*) FROM cabal_character_table WHERE Login = 1");
if( mssql_result($sql, 0, 0) <= 80){
echo "<font color=red>";
echo mssql_result($sql, 0, 0);}
elseif( mssql_result($sql, 0, 0) >= 80 AND mssql_result($sql, 0, 0) <= 150){
echo "<font color=Blue>";
echo mssql_result($sql, 0, 0);}
elseif( mssql_result($sql, 0, 0) > 150){
echo "<font color=green>";
echo mssql_result($sql, 0, 0);} ?>
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
Still the same after your changes :\
I am using IIS.
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
I download it and put them in my IIS directory, and when i go to index.php:

Usuarios online = 80 AND mssql_result($sql, 0, 0) <= 150){ echo ""; echo mssql_result($sql, 0, 0);} elseif( mssql_result($sql, 0, 0) > 150){ echo ""; echo mssql_result($sql, 0, 0);} ?>
Total contas

What can i do?
Maybe i need to install php on IIS? if i do so how?

thanks.
 
Newbie Spellweaver
Joined
Apr 2, 2006
Messages
14
Reaction score
0
just use php webserver...
 
Newbie Spellweaver
Joined
Apr 2, 2006
Messages
14
Reaction score
0
IIS for asp aspx !!!!!!! not support PHP script !
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
IIS for asp aspx !!!!!!! not support PHP script !

Oh.. so i can use 2 in the same time? one for php one for asp?

Edit:

How can i run asp and php in one thing?? i was installed wampserver and i go to 127.0.0.1 and it go to the IIS server..
 
Junior Spellweaver
Joined
Mar 5, 2007
Messages
177
Reaction score
109
port 80 IIS port 8090 wamp

>> IIS

wamp

in wamp.. config httpd.conf >> listen 8090
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
Ok now i installed PHP extension on my IIS, and when i open 127.0.0.1/index.php i got this error:

HTTP 500 - Internal server error.

What to do?!
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
Ok now i installed PHP extension on my IIS, and when i open 127.0.0.1/index.php i got this error:

HTTP 500 - Internal server error.

What to do?!
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
Ok now i installed PHP extension on my IIS, and when i open 127.0.0.1/index.php i got this error:

HTTP 500 - Internal server error.

What to do?!
 
Game Developer
Joined
Oct 1, 2005
Messages
420
Reaction score
47
Ok now i installed PHP extension on my IIS, and when i open 127.0.0.1/index.php i got this error:

HTTP 500 - Internal server error.

What to do?!

info from install.txt from PHP

Code:
__________________________________________________________________

Windows NT/200x/XP and IIS 4 or newer

   PHP may be installed as a CGI binary, or with the ISAPI module. In
   either case, you need to start the Microsoft Management Console (may
   appear as 'Internet Services Manager', either in your Windows NT 4.0
   Option Pack branch or the Control Panel=>Administrative Tools under
   Windows 2000/XP). Then right click on your Web server node (this will
   most probably appear as 'Default Web Server'), and select 'Properties'.

   If you want to use the CGI binary, do the following:

     * Under 'Home Directory', 'Virtual Directory', or 'Directory', do the
       following:
     * Change the Execute Permissions to 'Scripts only'
     * Click on the 'Configuration' button, and choose the Application
       Mappings tab. Click Add and set the Executable path to the
       appropriate CGI file. An example PHP 5 value is: C:\php\php-cgi.exe
       Supply .php as the extension. Leave 'Method exclusions' blank, and
       check the 'Script engine' checkbox. Now, click OK a few times.
     * Set up the appropriate security. (This is done in Internet Service
       Manager), and if your NT Server uses NTFS file system, add execute
       rights for I_USR_ to the directory that contains php.exe /
       php-cgi.exe.

   To use the ISAPI module, do the following:

     * If you don't want to perform HTTP Authentication using PHP, you can
       (and should) skip this step. Under ISAPI Filters, add a new ISAPI
       filter. Use PHP as the filter name, and supply a path to the
       php4isapi.dll / php5isapi.dll.
     * Under 'Home Directory', 'Virtual Directory', or 'Directory', do the
       following:
     * Change the Execute Permissions to 'Scripts only'
     * Click on the 'Configuration' button, and choose the Application
       Mappings tab. Click Add and set the Executable path to the
       appropriate ISAPI DLL. An example PHP 5 value is:
       C:\php\php5isapi.dll Supply .php as the extension. Leave 'Method
       exclusions' blank, and check the 'Script engine' checkbox. Now,
       click OK a few times.
     * Stop IIS completely (NET STOP iisadmin)
     * Start IIS again (NET START w3svc)

   With IIS 6 (2003 Server), open up the IIS Manager, go to Web Service
   Extensions, choose "Add a new Web service extension", enter in a name
   such as PHP, choose the Add button and for the value browse to either
   the ISAPI file (php4isapi.dll or php5isapi.dll) or CGI (php.exe or
   php-cgi.exe) then check "Set extension status to Allowed" and click OK.

   In order to use index.php as a default content page, do the following:
   From within the Documents tab, choose Add. Type in index.php and click
   OK. Adjust the order by choosing Move Up or Move Down. This is similar
   to setting DirectoryIndex with Apache.

   The steps above must be repeated for each extension that is to be
   associated with PHP scripts. .php is the most common although .php3 may
   be required for legacy applications.

   If you experience 100% CPU usage after some time, turn off the IIS
   setting Cache ISAPI Application.
     __________________________________________________________________

i recommend install ISAPI module and not CGI, but if ISAPI dont work try CGI.

But i recommend to use apache for PHP (its too better than IIS for PHP)
 
Master Summoner
Joined
Nov 9, 2004
Messages
527
Reaction score
53
Ok i succeded to install php on IIS, now i open
and its shows me Usoraio Online something like that and dont show the users.. only this nothing else!

Image:

phprap - [Script] Total User Online by phprap^^ - RaGEZONE Forums


Thanks.

And yes, i was edit the config to my sql usr and pass!
 
Last edited:
Junior Spellweaver
Joined
Jul 4, 2008
Messages
193
Reaction score
0
this one sux. i dont like. its just simple and gay. the one i made myself is better.
 
Back
Top