Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 5

107.22.x.x forum
112.111.x.x forum
173.208.x.x dilbertplus
175.44.x.x forum
66.249.x.x forum

Last Seen

xiagang Tue 03:08
Zipps Tue 03:07
Wussie Mon 18:32
Dodgeitorelse Mon 13:58
Hostprofil Mon 12:44

Newest Members

Forums
Server code wont work on website
Seppo
Fri Dec 31 2010, 01:55AM
Posts: 10
Joined: Fri Dec 31 2010, 01:52AM
Registered Member #6487
Hi im using the standalone version and trying to get the servers showing up on my website, i added

require "lgsl_files/lgsl_class.php";
$server_list = lgsl_query_group();
$total = lgsl_group_totals($server_list);
echo " Servers: {$total['servers']}
Servers Online: {$total['servers_online']}
Servers Offline: {$total['servers_offline']}
Players: {$total['players']}
Max Players: {$total['playersmax']} ";


I can see my website asuseall but were i placed the server it says the same as the code i putted :/
Rich
Sat Jan 01 2011, 06:10PM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

You mean you see the text ?

You need to put php tags around the code.

<?php

code

?>

Website
Seppo
Sun Jan 02 2011, 05:57AM
Posts: 10
Joined: Fri Dec 31 2010, 01:52AM
Registered Member #6487
If i do that i get mysql errors
Rich
Mon Jan 03 2011, 09:22AM
Posts: 1700
Joined: Wed Nov 26 2003, 04:30PM

What are the errors ?

If you are tring to load a CMS version of LGSL in a non CMS page, you will need to edit the lgsl_config.php and put in your database settings.

If you are using the stand-alone, and its your site making the SQL errors, you need to create the LGSL table in the site database, and change the lgsl_config.php to match.

Website
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org