• Send something to a HTTP server or something?
    3 replies, posted
If any of you remeber coderhire it had a tracker that showed how many people was using you addon and what servers they were. Script fodder does not have this so is there a way to do it without using scriptfodder? Maybe a way to send an email or something?
[url]http://wiki.garrysmod.com/page/http/Post[/url] You would need to make your own server side script using that and send it to a website that does something with the posted data.
[QUOTE=AIX-Who;47514155][url]http://wiki.garrysmod.com/page/http/Post[/url] You would need to make your own server side script using that and send it to a website that does something with the posted data.[/QUOTE] Thanks [editline]13th April 2015[/editline] [QUOTE=0V3RR1D3;47514392]Thanks[/QUOTE] Is there a way to get the server IP and Port?
[lua] GetConVarString('hostip') GetConVarString('hostport') [/lua] [editline]13th April 2015[/editline] You'll have to format the ip though: [lua] function game.GetIP() local hostip = GetConVarString( "hostip" ) -- GetConVarNumber is inaccurate hostip = tonumber( hostip ) local ip = {} ip[ 1 ] = bit.rshift( bit.band( hostip, 0xFF000000 ), 24 ) ip[ 2 ] = bit.rshift( bit.band( hostip, 0x00FF0000 ), 16 ) ip[ 3 ] = bit.rshift( bit.band( hostip, 0x0000FF00 ), 8 ) ip[ 4 ] = bit.band( hostip, 0x000000FF ) return table.concat( ip, "." ) end [/lua] [editline]13th April 2015[/editline] Source btw: [url]http://facepunch.com/showthread.php?t=1160598&p=38629185&viewfull=1#post38629185[/url]
Sorry, you need to Log In to post a reply to this thread.