How do i get players IP on online game?

Get help using Construct 2

Post » Tue Aug 26, 2014 1:12 pm

Hello,

I am working on an online game and knowing how online games players are, always appear some bad people that just want to disturb everything, so, we, games administrators, need to ban them and, in extrema cases, ban by IP.

So, how can i get players IPs on my C2 game? What i need for that?

Thanks!
B
7
S
3
Posts: 20
Reputation: 776

Post » Tue Aug 26, 2014 3:16 pm

Thopson1m wrote:Hello,

I am working on an online game and knowing how online games players are, always appear some bad people that just want to disturb everything, so, we, games administrators, need to ban them and, in extrema cases, ban by IP.

So, how can i get players IPs on my C2 game? What i need for that?

Thanks!

Banning IP might not be a good idea because some IP are shared between other user. However, I wish to know as well if this is somehow, doable inside C2, might be useful in case of attacks or something.

Bump.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Tue Aug 26, 2014 3:21 pm

Hello,

But do you know how to do that? Is it possible to do inside C2 or what?

Thanks.
B
7
S
3
Posts: 20
Reputation: 776

Post » Tue Aug 26, 2014 3:22 pm

Thopson1m wrote:Hello,

But do you know how to do that? Is it possible to do inside C2 or what?

Thanks.

Sorry, I don't know. I'm giving a slight bump because I'm curious of this as well.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Tue Aug 26, 2014 3:38 pm

Ok, lets wait for who know how to answer us. :]
B
7
S
3
Posts: 20
Reputation: 776

Post » Wed Aug 27, 2014 8:50 am

If your server allows crosssite requests, you can do an ajax call on: http://bot.whatismyipaddress.com/

Here the Rules for using that API: http://whatismyipaddress.com/api
B
44
S
10
G
8
Posts: 437
Reputation: 6,473

Post » Wed Aug 27, 2014 3:44 pm

I found a way! A friend showed me how! =D

Thanks, guys! :D
B
7
S
3
Posts: 20
Reputation: 776

Post » Wed Aug 27, 2014 4:03 pm

Thopson1m wrote:I found a way! A friend showed me how! =D

Thanks, guys! :D

I haven't look at this yet. Mind sharing a minimal capx on how to do it? I would be grateful to learn it. :D
Tutorial would be awesome. 8-)
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Wed Aug 27, 2014 4:11 pm

How it is VERY simple, i'll make a tutorial later. ^^
B
7
S
3
Posts: 20
Reputation: 776

Post » Wed Aug 27, 2014 6:03 pm

Guys, i completed my tutorial! Here it is: https://www.scirra.com/tutorials/1144/h ... line-games

I hope you enjoy it! =D
B
7
S
3
Posts: 20
Reputation: 776


Return to How do I....?

Who is online

Users browsing this forum: max2612 and 3 guests