Jump to content

Bonus Question :P


tibberous

Recommended Posts

I got it!

 

I took the number an used base_convert($num, 10, 16) to get a series of 8 alpha-numeric characters. Then, I used windows calculator to convert them from base-16 to base-10 2 at a time to get base 256.

 

But, for some reason, the sets are backwords. I only found this out b/c I was playing with my ip address. So, basically, if you get:

 

75.149.00.109

 

You just make it:

 

109.00.149.75

 

So, I kind of solved it, but there is a lot more standard way that just involves modding and dividing. Does anyone know that way?

 

@Teddy:

 

It converts an ip address to a base-10 number, so converting back would be getting the original ip.

Link to comment
https://forums.phpfreaks.com/topic/196246-bonus-question-p/#findComment-1030589
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.