get silkroad capacitydata packet

06/04/2011 14:56 prot3ctor#1
hi.. i'm planing to write a script that shows the capacity of a private server
i have a problem that i dont know how to catch the packet that have the information that i need.
i'm going to write it in php.

please help :)
06/04/2011 15:08 kevin_owner#2
You can't write it with php only. (at least I don't know if it can be done with sockets in php)

You need a program which connects to the login server and send the packet which requests the server list every 5 seconds or whatever what time you need and store the result into a mysql database and display that on your website.
06/04/2011 15:35 prot3ctor#3
got it :)
i will write the program in c# and than display it with php
the problem is that i dont know how to connect to the server and request the server list
06/04/2011 16:17 DaxterSoul#4
I think [Only registered and activated users can see links. Click Here To Register...] is all what you need for a clientless connection to Gatewayserver.
06/04/2011 21:18 pushedx#5
Quote:
Originally Posted by kevin_owner View Post
You can't write it with php only. (at least I don't know if it can be done with sockets in php)
It's possible in PHP because it supports [Only registered and activated users can see links. Click Here To Register...], crypto via [Only registered and activated users can see links. Click Here To Register...], and large numbers via [Only registered and activated users can see links. Click Here To Register...]. As long as the host has enabled sockets for outgoing connections (which most do, most however do not allow incoming connections for a server), has enabled the bcmath and mcrypt libs (also pretty standard, even with free hosts) the code needed for the Silkroad security API should work.

However, it also requires a bit of work since you have to port most of the Silkroad security API to PHP as well. You wouldn't need the server functionality, just the clientless functionality, but that doesn't really reduce how much code there is to port. So it's more realistic for most people to just use an external program to update their database. I might release PHP code in the future about this, but I'll have to see.
06/04/2011 22:33 bootdisk#6
interesting I was tempted when I read your post but then I saw [Only registered and activated users can see links. Click Here To Register...] and I'll quote:

Quote:
The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits signed). 64-bit platforms usually have a maximum value of about 9E18. PHP does not support unsigned integers.
Which can be a problem... but I'm sure there should be some trick around.
Luckily [Only registered and activated users can see links. Click Here To Register...] remain the same.

It might be an interesting project!
Oh yeah, I like to reinvent the wheel or to code things in pure language implementations.
06/05/2011 18:21 Kazuyaš#7
haha this reminds me of klevres WebClientless project that was never finished :P