COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 01-09-2006, 01:27 AM   #1
dirmass
Human being with feelings
 
dirmass's Avatar
 
Join Date: Nov 2005
Location: AU, WA
Posts: 141
Default 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
dirmass is offline   Reply With Quote
Old 01-14-2006, 01:17 AM   #2
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

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
Justin is offline   Reply With Quote
Old 01-14-2006, 08:29 AM   #3
dirmass
Human being with feelings
 
dirmass's Avatar
 
Join Date: Nov 2005
Location: AU, WA
Posts: 141
Default

cheers, it would really be helpful
dirmass is offline   Reply With Quote
Old 01-14-2006, 02:40 PM   #4
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

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
Justin is offline   Reply With Quote
Old 01-16-2006, 07:18 PM   #5
dirmass
Human being with feelings
 
dirmass's Avatar
 
Join Date: Nov 2005
Location: AU, WA
Posts: 141
Default

Thanks Justin, I really appreciate it. Think this will help others too.
dirmass is offline   Reply With Quote
Old 04-09-2006, 01:33 PM   #6
yanhl
Human being with feelings
 
Join Date: Apr 2006
Location: Paris, France
Posts: 7
Default 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
yanhl is offline   Reply With Quote
Old 04-12-2006, 04:36 AM   #7
dirmass
Human being with feelings
 
dirmass's Avatar
 
Join Date: Nov 2005
Location: AU, WA
Posts: 141
Default

.phps files are the ones you want:
http://devplant.com/ninjam/staticfiles/
dirmass is offline   Reply With Quote
Old 04-12-2006, 05:59 AM   #8
yanhl
Human being with feelings
 
Join Date: Apr 2006
Location: Paris, France
Posts: 7
Default 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.
yanhl is offline   Reply With Quote
Old 04-12-2006, 05:27 PM   #9
dirmass
Human being with feelings
 
dirmass's Avatar
 
Join Date: Nov 2005
Location: AU, WA
Posts: 141
Default

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.
Attached Files
File Type: zip ninjamserver.zip (74.4 KB, 914 views)
dirmass is offline   Reply With Quote
Old 04-13-2006, 03:43 AM   #10
yanhl
Human being with feelings
 
Join Date: Apr 2006
Location: Paris, France
Posts: 7
Default 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.
yanhl is offline   Reply With Quote
Old 04-14-2006, 06:13 PM   #11
neimad
Human being with feelings
 
neimad's Avatar
 
Join Date: Aug 2005
Posts: 8
Default 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.
neimad is offline   Reply With Quote
Old 04-15-2006, 03:32 AM   #12
yanhl
Human being with feelings
 
Join Date: Apr 2006
Location: Paris, France
Posts: 7
Default

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.
yanhl is offline   Reply With Quote
Old 05-10-2007, 12:44 PM   #13
Pruitt
Human being with feelings
 
Join Date: Aug 2006
Posts: 11
Default

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!
Pruitt is offline   Reply With Quote
Old 06-01-2007, 01:25 PM   #14
Pruitt
Human being with feelings
 
Join Date: Aug 2006
Posts: 11
Default

Quote:
Originally Posted by Pruitt View Post
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.
Pruitt is offline   Reply With Quote
Old 06-01-2007, 06:33 PM   #15
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 15,721
Default

http://ninjam.com/downloads/php-src/

should now work again.


-Justin
Justin is offline   Reply With Quote
Old 06-01-2007, 06:46 PM   #16
Pruitt
Human being with feelings
 
Join Date: Aug 2006
Posts: 11
Default

Quote:
Originally Posted by Justin View Post
http://ninjam.com/downloads/php-src/

should now work again.


-Justin
Thanks a lot, Justin! Much appreciated. Great little application you have here.

Now to figure out how to use it. lol...
Pruitt is offline   Reply With Quote
Old 06-01-2007, 07:37 PM   #17
Pruitt
Human being with feelings
 
Join Date: Aug 2006
Posts: 11
Default

Quote:
Originally Posted by yanhl View Post
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...
Pruitt is offline   Reply With Quote
Old 06-16-2007, 06:52 AM   #18
Guitar Edman
Human being with feelings
 
Join Date: May 2007
Location: New Mexico
Posts: 106
Default

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
Guitar Edman is offline   Reply With Quote
Old 06-16-2007, 10:17 AM   #19
Pruitt
Human being with feelings
 
Join Date: Aug 2006
Posts: 11
Default

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.
Pruitt is offline   Reply With Quote
Old 01-13-2008, 10:41 AM   #20
Pruitt
Human being with feelings
 
Join Date: Aug 2006
Posts: 11
Default

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!!
Pruitt is offline   Reply With Quote
Old 08-14-2009, 09:45 AM   #21
pilami
Human being with feelings
 
Join Date: Aug 2009
Posts: 1
Default

hi !

it is possible to see php files? address doesn't work anymore :/
pilami is offline   Reply With Quote
Old 04-30-2010, 04:25 PM   #22
Streets
Human being with feelings
 
Join Date: Aug 2005
Posts: 27
Default

Quote:
Originally Posted by pilami View Post
hi !

it is possible to see php files? address doesn't work anymore :/
links still dead
Streets is offline   Reply With Quote
Old 06-23-2010, 03:54 PM   #23
jkramer5
Human being with feelings
 
Join Date: May 2010
Posts: 2
Default

Any current info on this? I'd love to be able to show details from my server on my site.
jkramer5 is offline   Reply With Quote
Old 06-25-2010, 12:11 PM   #24
jkramer5
Human being with feelings
 
Join Date: May 2010
Posts: 2
Default

Bump. Anyone? Display my ninjam server details on my website? Is this thing on?
jkramer5 is offline   Reply With Quote
Old 09-18-2010, 09:36 AM   #25
Martinlj
Human being with feelings
 
Join Date: Sep 2010
Posts: 1
Default

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
Martinlj is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.