|
01-09-2006, 01:27 AM
|
#1
|
Human being with feelings
Join Date: Nov 2005
Location: AU, WA
Posts: 141
|
showing Server info on a webpage
hey there. I was thinking of hosting some ninjam servers for the general public.
I'm hoping to make an index of NINJAM servers, something like a wiki. Similar to the Jam Farm. but people can add their own servers..
is there any chance that you might release the source of the Jam Farm. Or at least give me some direction on how I can show the number of people playing on the server, who is playing, topic or the bpm using server side scripting?
I have good web dev skills and some PHP knowledge but i know very little C++.
thanks
|
|
|
01-14-2006, 01:17 AM
|
#2
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
Quote:
Originally Posted by dirmass
hey there. I was thinking of hosting some ninjam servers for the general public.
I'm hoping to make an index of NINJAM servers, something like a wiki. Similar to the Jam Farm. but people can add their own servers..
is there any chance that you might release the source of the Jam Farm. Or at least give me some direction on how I can show the number of people playing on the server, who is playing, topic or the bpm using server side scripting?
I have good web dev skills and some PHP knowledge but i know very little C++.
thanks
|
We have some PHP code that connects directly to the NINJAM server, which we use on the jam farm, I'll post it soon.
-Justin
|
|
|
01-14-2006, 08:29 AM
|
#3
|
Human being with feelings
Join Date: Nov 2005
Location: AU, WA
Posts: 141
|
cheers, it would really be helpful
|
|
|
01-14-2006, 02:40 PM
|
#4
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
Quote:
Originally Posted by dirmass
cheers, it would really be helpful
|
OK here you go:
http://www.ninjam.com/downloads/php-src/
the njproto.phps should be renamed to .php, and has basic message parsing/forming code.. example.phps uses it to query the status of a server.
-Justin
|
|
|
01-16-2006, 07:18 PM
|
#5
|
Human being with feelings
Join Date: Nov 2005
Location: AU, WA
Posts: 141
|
Thanks Justin, I really appreciate it. Think this will help others too.
|
|
|
04-09-2006, 01:33 PM
|
#6
|
Human being with feelings
Join Date: Apr 2006
Location: Paris, France
Posts: 7
|
No more sources ?
hello,
the php sources that show ninjam server infos interest me too, but now the path in the previous message leads to a 403 error.
can you post the sources again ? or even put the link on the download page as it might interest many webmasters ?
thanx
|
|
|
04-12-2006, 04:36 AM
|
#7
|
Human being with feelings
Join Date: Nov 2005
Location: AU, WA
Posts: 141
|
|
|
|
04-12-2006, 05:59 AM
|
#8
|
Human being with feelings
Join Date: Apr 2006
Location: Paris, France
Posts: 7
|
thanks
Thank you !
I have a little problem : it refuses to login.
$user=""; // set up the server with a l/p for your status user
$pass="";
$port="";
$host="";
I filled these strings with my server parameters and tried with my admin account, then i created a "status" user with the * rights... in both cases, i get a "invalid login to server !" message.
show.php displays the CC license so the server parameters are right.
I can log in with my admin and "status" users with the ninjam client so my users are well recognized, my config file is ok.
Any idea ? Should i define a "status" user with special rights assigned to it ?
I use the latest server release (v0.02).
Last edited by yanhl; 04-12-2006 at 01:49 PM.
|
|
|
04-12-2006, 05:27 PM
|
#9
|
Human being with feelings
Join Date: Nov 2005
Location: AU, WA
Posts: 141
|
is that a windows server?
in that case, i had the same problem... neimad helped me there, apparently you need to modify the server source:
this is what i have for the login :
Code:
$user="getstatsid";
$pass="status";
I attached the modified windows server so you can use it.
|
|
|
04-13-2006, 03:43 AM
|
#10
|
Human being with feelings
Join Date: Apr 2006
Location: Paris, France
Posts: 7
|
still have probs
Thanks for the exe but unfortunately my server is running under Debian, so i can't use it.
I tried to find something in the ninjamserver source code but i'm not a c++ coder so it's almost chinese to me.
Anyway, the ninjamsrv.cpp indicates that a StatusUserPass must be defined in the config file :
StatusUserPass statususerlogin statususerpwd
So i added a StatusUserPass line in my config file but it still doesn't work.
Config file is well parsed, the StatusUserPass is used (i have put traces to check that).
So i continued my investigations, and now i think that the problem is located in the auth part.
Maybe the php code sends a malformed message, i really don't know.
in ninjamsrv.cpp, line 203 :
if (g_status_user.Get()[0] && !strcmp( username.Get(),g_status_user.Get()))
compares a [code+username] instead of the [username] specified in the $user string of show.php.
so i guess there's a data problem somewhere, i tried to find where for a few hours but i really can't understand why the username is not my username only, at line 203.
in the logfile, i can see :
"got login request for '4368c984efd4c00bab68status'
this line is put by ninjamsrv.cpp @ line 198 and, of course, my Status username is 'status'.
Can anybody help me and tell me what to change in parse.php or in the ninjamsrv source code to allow a status user to login corectly ?
Or did i miss something ? Maybe i'm on the wrong way ?
Please... heeeelp !
Last edited by yanhl; 04-13-2006 at 10:01 AM.
|
|
|
04-14-2006, 06:13 PM
|
#11
|
Human being with feelings
Join Date: Aug 2005
Posts: 8
|
duh...
the windows version needed recompiling cuz its was 0.1 orsomething and didnt had the status user in the config for it...so i toke the source for linux 0.2 and compiled it with vc++6 and thats what dirmass used... about the linux version just add those id/pw to the config file and compile the linux version out of the box... should work fine! Justin did a awesome job!
O ya and the php page needed a change due it was written for php5+, and we running php4+...so i you have php5- yo will need to change it.
change: parse.php
function nj_makepasshash($user, $pass, $challenge)
{
$s = pack("H*", sha1($user . ":" . $pass));
return (pack("H*", sha1($s.$challenge)));
}
good luck :P
Last edited by neimad; 04-14-2006 at 06:16 PM.
|
|
|
04-15-2006, 03:32 AM
|
#12
|
Human being with feelings
Join Date: Apr 2006
Location: Paris, France
Posts: 7
|
i changed my nj_makepasshash with the one you gave in the previous message (my server is running a php 4.x too)
...and it works !!!
thank you very, very much !
thanks to dirmass for his help too and justin for this superb piece of software.
|
|
|
05-10-2007, 12:44 PM
|
#13
|
Human being with feelings
Join Date: Aug 2006
Posts: 11
|
It seems like all the links to the php code are dead. Is there any chance of being able to obtain this code again? I've recently setup a Ninjam server and would like to display the users on the server on my website, like what you have on the jam Farm page. Any help would be appreciated. Thanks!
|
|
|
06-01-2007, 01:25 PM
|
#14
|
Human being with feelings
Join Date: Aug 2006
Posts: 11
|
Quote:
Originally Posted by Pruitt
It seems like all the links to the php code are dead. Is there any chance of being able to obtain this code again? I've recently setup a Ninjam server and would like to display the users on the server on my website, like what you have on the jam Farm page. Any help would be appreciated. Thanks!
|
Anybody have this code available? BTW, I'm running Ninjam on a Linux server.
|
|
|
06-01-2007, 06:33 PM
|
#15
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,746
|
|
|
|
06-01-2007, 06:46 PM
|
#16
|
Human being with feelings
Join Date: Aug 2006
Posts: 11
|
Quote:
Originally Posted by Justin
|
Thanks a lot, Justin! Much appreciated. Great little application you have here.
Now to figure out how to use it. lol...
|
|
|
06-01-2007, 07:37 PM
|
#17
|
Human being with feelings
Join Date: Aug 2006
Posts: 11
|
Quote:
Originally Posted by yanhl
Thank you !
I have a little problem : it refuses to login.
$user=""; // set up the server with a l/p for your status user
$pass="";
$port="";
$host="";
I filled these strings with my server parameters and tried with my admin account, then i created a "status" user with the * rights... in both cases, i get a "invalid login to server !" message.
show.php displays the CC license so the server parameters are right.
I can log in with my admin and "status" users with the ninjam client so my users are well recognized, my config file is ok.
Any idea ? Should i define a "status" user with special rights assigned to it ?
I use the latest server release (v0.02).
|
Hmmm..., unfortunately, I seem to have run into the same difficulties with trying to implement this tonight. Any thoughts from anyone? I'm on a Linux server running php5+.
I tried making the change suggested above for php5- but that didn't help. I should mention that for some reason I cannot login to my server using a user setup in the config file. I can only successfully login as anonymous. Very weird and nothing I have tried has allowed me to login with an authenticated user, so I'm sure that's where my problem is. I just have no idea how to get around it. lol...
If anyone has any ideas, I'd be happy to try them out. lol...
|
|
|
06-16-2007, 06:52 AM
|
#18
|
Human being with feelings
Join Date: May 2007
Location: New Mexico
Posts: 106
|
I have a ninjam server that I would like to make publicly available and add a page on a web site like this for it. Can anyone confirm there is a way to do this with Windows Server 2003 and write a quick how to for a complete php newbie?
Thanks
|
|
|
06-16-2007, 10:17 AM
|
#19
|
Human being with feelings
Join Date: Aug 2006
Posts: 11
|
I still cannot get it to work. I keep getting some type of authentication error and nothing I've tried has allowed me to get around it.
Like I mentioned in my last post, for some reason I cannot use names and passwords that I've "registered" in the config file. Again I get an authentication error when trying to connect with a userid & password. I believe these errors are related. I'm just not sure what I need to do to fix it. lol... I can connect to the server anonymously to jam, but the secure access is not working for some reason.
If you (or anyone else for that matter) get it to work, please post here how you did it. This is a stumbling point for me using this with my community.
|
|
|
01-13-2008, 10:41 AM
|
#20
|
Human being with feelings
Join Date: Aug 2006
Posts: 11
|
I'm curious if anyone has been able to get this to work recently? I've had no luck at all in getting the script to work and can't figure out why. It sure would be nice to get this working, as it's a major impediment for me in getting my members to use Ninjam.
Any help would be appreciated!!
|
|
|
08-14-2009, 09:45 AM
|
#21
|
Human being with feelings
Join Date: Aug 2009
Posts: 1
|
hi !
it is possible to see php files? address doesn't work anymore :/
|
|
|
04-30-2010, 04:25 PM
|
#22
|
Human being with feelings
Join Date: Aug 2005
Posts: 27
|
Quote:
Originally Posted by pilami
hi !
it is possible to see php files? address doesn't work anymore :/
|
links still dead
|
|
|
06-23-2010, 03:54 PM
|
#23
|
Human being with feelings
Join Date: May 2010
Posts: 2
|
Any current info on this? I'd love to be able to show details from my server on my site.
|
|
|
06-25-2010, 12:11 PM
|
#24
|
Human being with feelings
Join Date: May 2010
Posts: 2
|
Bump. Anyone? Display my ninjam server details on my website? Is this thing on?
|
|
|
09-18-2010, 09:36 AM
|
#25
|
Human being with feelings
Join Date: Sep 2010
Posts: 1
|
Hi,
I'm also interested but unfortunately links seem to be dead
If someone could upload the php code again, it would be very nice
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:53 AM.
|