Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Alias - Ip

 
Post new topic   Reply to topic Printable version
 View previous topic  Fake Players Post :: Post view score  View next topic  
Author Message
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Mon Nov 13, 2006 8:14 pm    Post subject: Alias - Ip Reply to topic Reply with quote

On the alias module that comes in ASSS, the ip is stored as an integer instead of the decimal form, how do I get it back into that decimal form in php? You might have seen my alias site that is linked the logic bot, well in logic bot the ip is stored as a plain ip. How can i convert this integer back into the decimal ip form? Thanks in advance.

Example: 192.168.1.104 = 3232235880
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Mon Nov 13, 2006 8:31 pm    Post subject: Reply to topic Reply with quote

long2ip. Warning: depends on the byte order, so it may result in reverse numbering.
Back to top
View users profile Send private message Add User to Ignore List Send email
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Mon Nov 13, 2006 8:52 pm    Post subject: Reply to topic Reply with quote

Thank you so much. This worked.
Nice job on the fast response time. <3 icon_biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Nov 14, 2006 5:23 am    Post subject: Reply to topic Reply with quote

If you look at the source to asss's alias module you can see there is a mysql function called inet_ntoa.
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Tue Nov 14, 2006 7:45 am    Post subject: Reply to topic Reply with quote

I did see that. I looked at it before I posted.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Tue Nov 14, 2006 11:28 am    Post subject: Reply to topic Reply with quote

That's a mysql function? I think it's a networking (Winsock/whatever linux uses) function.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Tue Nov 14, 2006 2:33 pm    Post subject: Reply to topic Reply with quote

http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html

fourth and fifth functions from the top of the page.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
BDwinsAlt
Agurus's Posse


Age:34
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Tue Nov 14, 2006 5:02 pm    Post subject: Reply to topic Reply with quote

Nice, I thought it was a built in function in AS3 or something. I think it would be faster/better to just call the integer value from mysql then use long2ip. Calling the integer value, then calling the value of the integer in a decimal would mean putting a little more stress on the mysql server. I try to make everything load as fast and easy as possible.

If I notice the IPs not turning out right then I'll use the mysql function.

Thanks for helping me guys.

p.s. I know its not much for the sql server to do but I'm just picky about things.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Nov 15, 2006 11:30 am    Post subject: Reply to topic Reply with quote

Crazy. Why'd they put that in mysql too?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:42
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Wed Nov 15, 2006 2:30 pm    Post subject: Reply to topic Reply with quote

Because MySQL is usually a database behind an application running for multiple users. Since multiple users usually come from different locations, be it the Internet or on a LAN, IP storage is common. Since IPs are stored as numbers (4 bytes for IPv4, 16 bytes for IPv6), might as well support an easy to use interface for accessing those numbers. It is not like those couple of functions add much bloat.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 34 page(s) served in previous 5 minutes.

phpBB Created this page in 0.423576 seconds : 34 queries executed (93.6%): GZIP compression disabled