TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,993
  • Total Topics: 21,324
  • Online today: 368
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 289
  • Total: 289

Server Query

Started by HaxXxoR, April 16, 2006, 01:29:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gundamzero

Yes, thanks and I did ask them.  That game is so old now but a loyal following still exists.  A mod like this would be nice.  My site is based on that game.  It is probably the most popular remaining Tribes site thanks to what can be done with TP. ;)

JOSHSKORN

Quote from: G6 on July 04, 2007, 07:37:05 AM
If you get a 404 or a blank page when you execute the file itself from the browser, it must be something with the file itself, and not the include to TP.
I've switched servers since my last inquiry on this subject.  I've installed squery again, and I get the same problem, the blank area.  I've taken just about all the advice I can find on this thread, I've tried all posted code and I can't get anything to work.

The reason I'm quoting this particular reply, is that I did just that.  I accessed the file by the following url: http://clansrv.crazynomad.net/thesite/gamequery/blocks/block-SQuery_tiny.php, and I get the error 404.  More specifically:

Quote
Not Found

The requested URL /thesite/gamequery/blocks/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

So where am I going wrong w/ this now?  In my config.php, I've configured the stand alone static area, the block area and the favorites area AND have removed the comment marks.  Note that when I do access the Squery_block-tiny.php by navigating to the exact url, it redirects to the index.php file of that particular folder.

Some of the code mentioned on earlier pages of this thread are from earlier versions of squery.  This particular file is v4.0.1, whereas when being discussed earlier, it was v3.5 I believe.  This file has the line:


$libpath="./SQuery/lib/";


Do I need to change the libpath to the full path?  I tried that with both the current code and the older version as well.  No luck.

Can I test someone else's working version on my server (just zip up the entire squery install and E-mail it to JOSHSKORN@aol.com)?

IchBin

Check the download from Squery. As your 404 is pointing to the index.php file in the main folder of Squery. Its working, you just have to get the right one working. :)

http://clansrv.crazynomad.net/thesite/gamequery/SQuery/index.php

JOSHSKORN

Quote from: IchBinâ,,¢ on September 06, 2007, 01:38:53 PM
Check the download from Squery. As your 404 is pointing to the index.php file in the main folder of Squery. Its working, you just have to get the right one working. :)

http://clansrv.crazynomad.net/thesite/gamequery/SQuery/index.php

Here's another question.  I don't know which one IS the right one.  There's two files, as you may know: block-SQuery.php and block-SQuery_tiny.php.  My INTENT, is to place my server query inside of a CENTER block, UNDER my feature article.

IchBin

Is the link I just gave you not working? Or is it now the one you want or something?

JOSHSKORN

Quote from: IchBinâ,,¢ on September 07, 2007, 01:06:07 PM
Is the link I just gave you not working? Or is it now the one you want or something?

The link above works fine for me.  Once again, I want my server query to appear inside a center block, with favorites on it.  I click a favorite, the result appears within the block.  Which file do I include to make this work, or do I include the link above?  Seems like the link above is simply for 'standalone'.

IchBin

Can you get either of the blocks files to work? If not, I would suggest you seek help from the author of the script. Once you get the file working like you need, then come back and we'll show you how to include it. Although, that has already been done in this thread.

JOSHSKORN

Quote from: IchBinâ,,¢ on September 09, 2007, 04:49:34 AM
Can you get either of the blocks files to work? If not, I would suggest you seek help from the author of the script. Once you get the file working like you need, then come back and we'll show you how to include it. Although, that has already been done in this thread.

OK I got it to work.  I've come to the conclusion that something is wrong on my host, and that there's a wrong setting in the php.ini file.  What, I don't know.  I had this problem when trying to set up a TS Viewer from the squery website.  The one guy I've got helping me, got frustrated and just used the iframe code from the tsviewer website to get THAT to work.

I've decided to put together some instructions on how to get this thing to work.  Please don't delete it.  Some might find it useful. ;)  Again, these instructions DO work, but it may not be the exact preferred method.  This is using an IFRAME, not with PHP.


  • Register at squery.com and download the latest SQuery Full installation.  Upload the file to your webhost, to the folder where your website resides.  Example: www/mysite/gamequery (in the mysite folder).  You'll have to create the subdirectory 'gamequery', where you'll unzip the file contents.
  • Navigate to www/mysite/gamequery/SQuery/lib, and open up the file config.php for editing.  Immediately save a backup of your original file, you can call it for instance config.old.  Uncomment out the Stand-alone lines (there are three) and fill out the information: IP address, port #, and game.  Set the websiteurl variable, as well (example: http://www.mydomain.com/mysite).  Save this file.
  • Test SQuery out in standalone method.  Go to www.mydomain.com/mysite/gamequery/squery/index.php.  What you SHOULD see, is a game query form, and it queries the server you've put your information in, for.
  • Test it out, type in all of your server IPs, make sure they all query.  Then, type the first server you want to see queried when your site is accessed.  Copy this URL.  It will end in something similar to ?ip=208.48.88.46&port=2302&game=Halo&block=0.
  • Go back to your website, access the Administration area, Click Block Manager, and Add a Center block. Select the scriptbox option, then copy in the following code:

<iframe name="frame1" src="http://www.mydomain/com/mysite/gamequery/SQuery/index.php?ip=208.48.88.46&port=2302&game=Halo&block=0" scrolling="Auto" width="100%" height="400"></iframe>


  • Next, we want to add links to our game query, for each server.  These are called 'favorites'.  Open up the config.php file, comment out the standalone lines, and scroll down to the middle, where the favorites array is.  Read the instructions and add in your servers to this array.  Scroll back up to where you see:

// Display tips at bottom of query TRUE or FALSE
$displaytips=TRUE;
// Display IP Entry Form at Top TRUE or FALSE
$show_ip_entry_form=TRUE;


    If you don't want to display the form for entering IP, port and game, set show_ip_entry_form to FALSE.  If you don't want to display the tips, set displaytips to FALSE.
    • Turn the block ON, refresh your screen and see if it works.  If you know HTML, you can customize the index.php file to your liking, but lets be fair and not delete the squery credits.

    This may not be for everyone, but it just happened to work for me.  For some reason, my server isn't executing some PHP properly, so this is a 'work-around'.  I kept getting Error 404s trying to include the block-SQuery.php file.  Note that with the above script code, you have total control of the height.  If you would rather put your server query in a left or right block, you might have to recode the index.php file yourself.  I would have no idea how to do this.

    I wish I could explain why I'm having problems with PHP, my Donation block has the include statement, and THAT works just fine.  Other uses of it have not been that successful, and I cannot answer why.  Oh well, if it ain't broke, don't fix it.

This website is proudly hosted on Crocweb Cloud Website Hosting.