Posts: 3
Threads: 1
Joined: Jan 2015
11 Jan 15, 10:45AM
(This post was last modified: 12 Jan 15, 07:47PM by tkon99.
Edit Reason: More info needed for installation
)
Hi guys,
I made a simple PHP/Js implementation for the AC info port, this allows you to put server info on your website easily.
Check out the github repo for more information:
https://github.com/tkon99/AC-Info
I made it plain so you can easily style it to your own website's design.
I hope you like it!
EDIT:
You need an unrestricted PHP server for this!!! Most web hosts won't work. I suggest using a vps with php installed. (Perhaps the vps you host your server on (if dedicated)). I do it this way and it works fine. Maybe I'll set up a proxy some day and make it even simpler to use.
Posts: 400
Threads: 37
Joined: Jun 2010
Can always be useful, thank you!
Posts: 1,049
Threads: 55
Joined: Nov 2010
I like this but one suggestion:
if(!empty($getServer)){
$server = $getServer;
}else{
$server = "5.231.63.236";
}
Instead of having your predefined ip as a fallback, don't you think it would be safer to assume local host or 127.0.0.1?
Posts: 286
Threads: 31
Joined: Apr 2014
Really cool idea, just can't seem to get it working right.
Posts: 729
Threads: 16
Joined: Dec 2012
Your project appears to require jQuery. Considering you only use it for one line, I would recommend reworking it slightly so that it is not a dependency, that way people that don't necessarily want to use jQuery can still use your project.
Posts: 13
Threads: 0
Joined: Oct 2014
Posts: 3
Threads: 1
Joined: Jan 2015
(11 Jan 15, 06:36PM)X-Ray_Dog Wrote: I like this but one suggestion:
if(!empty($getServer)){
$server = $getServer;
}else{
$server = "5.231.63.236";
}
Instead of having your predefined ip as a fallback, don't you think it would be safer to assume local host or 127.0.0.1?
Yes, I'll remove it as default fallback.
Posts: 3
Threads: 1
Joined: Jan 2015
I also updated the first post with some extra info on how to use it.
Posts: 400
Threads: 37
Joined: Jun 2010
I've created a pull request for you... :)
Posts: 272
Threads: 25
Joined: Aug 2010
does this work?
i tried too use it but it just shows me this:
---------------------------
AC-info Demo
Name:
Players: /
Online for: hours, minutes and seconds.
Posts: 1,049
Threads: 55
Joined: Nov 2010
Posts: 272
Threads: 25
Joined: Aug 2010
I have a debian host and this is the site
http://46.28.202.43/~iguana/
I have also php5 and libjs-jquery installed, do i need any other dependencies?
Posts: 1,049
Threads: 55
Joined: Nov 2010
Did you put the api folder n stuff in the same directory as your landing page? I didn't do anything extra to make it work, just need php I believe.
Posts: 272
Threads: 25
Joined: Aug 2010
everything is linked correctly to the page, i even tried it on a different webserver that has apache instead of lighttpd, both have php5, didint make a difference
Posts: 1,049
Threads: 55
Joined: Nov 2010
Chmod 777 all of the files?
Posts: 272
Threads: 25
Joined: Aug 2010
yes, did that now and restarted lighttpd, still no change
Posts: 1,049
Threads: 55
Joined: Nov 2010
Looking at your website, I see
ACinfo("46.28.202.43", "28760", function(data){
Does your server run on port 28759?? If the main server port is 28760 then your info port is 28761 and that's what you need instead.
Posts: 272
Threads: 25
Joined: Aug 2010
ah, thanks!
its fixed now
Posts: 740
Threads: 61
Joined: Jun 2011
Works for me:
http://sctechusa.com/status
I integrated it into phpSysInfo