Help needed with script.. FREE Hosting In Exchange!

Discussion in 'Programming' started by hvalle98, Oct 1, 2008.

  1. #1
    Hello, I don't know programming, and I want to have all the possible IPs between a range. Can you help me to make a script on ANY language that will allow me to copy all the IPs in a range? The output must use the following syntax: if($Ip == "xxx.xx.xx.xx")

    So, For example, using the range from 209.124.97.0 to 209.124.97.255 , will make the script write
    if($Ip == "209.124.97.0")
    PHP:
    if($Ip == "209.124.97.1")
    PHP:
    if($Ip == "209.124.97.2")
    PHP:
    etc .... until
    if($Ip == "209.124.97.255")
    PHP:
    .

    I dont have a way to pay with money, so I will give you hosting if you make the script. So, send me the program and your hosting specs, I will give all the space and bandwidth and everything you need, with cPanel. (note: no proxies, no warez, no illegal porn)



    The IP Ranges are:

    
    63.245.72.0 to 63.245.79.255
    64.15.134.24 to 64.15.134.31
    66.96.34.0 to 66.96.35.255
    66.119.77.0 to 66.119.77.255
    66.181.61.136 to 66.181.61.143
    66.181.62.72 to 66.181.62.103
    66.181.62.200 to 66.181.62.207
    66.181.63.0 to 66.181.63.7
    67.192.5.208 to 67.192.5.223
    69.20.113.64 to 69.20.113.71
    69.79.72.0 to 69.79.79.255
    69.79.112.0 to 69.79.119.255
    72.3.209.200 to 72.3.209.207
    72.252.40.0 to 72.252.71.255
    72.252.88.0 to 72.252.103.255
    74.205.19.88 to 74.205.19.95
    168.234.0.0 to 168.234.255.255
    190.0.192.0 to 190.0.223.255
    190.4.0.0 to 190.4.63.255
    190.14.128.0 to 190.14.143.255
    190.56.0.0 to 190.56.255.255
    190.57.80.0 to 190.57.109.255
    190.57.112.0 to 190.57.113.255
    190.57.116.0 to 190.57.123.255
    190.98.128.0 to 190.98.131.255
    190.99.16.0 to 190.99.63.255
    190.148.0.0 to 190.148.255.255
    192.150.126.0 to 192.150.126.255
    192.207.183.0 to 192.207.183.255
    200.0.176.0 to 200.0.177.255
    200.1.153.0 to 200.1.153.255
    200.6.192.0 to 200.6.255.255
    200.9.74.0 to 200.9.74.255
    200.9.255.0 to 200.9.255.255
    200.10.241.0 to 200.10.241.255
    200.12.32.0 to 200.12.63.255
    200.12.224.16 to 200.12.224.31
    200.12.224.48 to 200.12.224.63
    200.12.224.72 to 200.12.224.95
    200.12.224.160 to 200.12.224.175
    200.12.225.0 to 200.12.225.255
    200.12.235.8 to 200.12.235.15
    200.12.235.160 to 200.12.235.191
    200.30.38.0 to 200.30.39.255
    200.30.133.0 to 200.30.133.255
    200.30.140.0 to 200.30.151.255
    200.30.154.0 to 200.30.154.255
    200.30.158.0 to 200.30.161.255
    200.30.167.0 to 200.30.167.255
    200.30.172.0 to 200.30.176.255
    200.30.180.0 to 200.30.191.255
    200.35.160.0 to 200.35.191.255
    200.41.4.192 to 200.41.4.215
    200.41.7.16 to 200.41.7.23
    200.41.84.0 to 200.41.87.255
    200.49.160.0 to 200.49.191.255
    200.62.32.0 to 200.62.39.255
    200.81.48.0 to 200.81.55.255
    200.105.68.0 to 200.105.68.255
    200.107.216.0 to 200.107.223.255
    200.110.200.0 to 200.110.207.255
    200.110.240.0 to 200.110.255.255
    200.119.128.0 to 200.119.159.255
    200.125.176.0 to 200.125.183.255
    201.216.128.0 to 201.216.191.255
    205.211.224.0 to 205.211.225.255
    208.96.140.0 to 208.96.143.255
    209.88.224.0 to 209.88.227.255
    209.124.97.0 to 209.124.97.255
    209.169.40.208 to 209.169.40.215
    209.169.41.208 to 209.169.41.215
    209.190.8.8 to 209.190.8.15
    209.190.113.120 to 209.190.113.127
    212.63.178.224 to 212.63.178.227
    216.72.28.0 to 216.72.31.255
    216.72.124.0 to 216.72.124.255
    216.230.128.0 to 216.230.159.255
    PHP:

    Thanks!
     
    hvalle98, Oct 1, 2008 IP
  2. ezprint2008

    ezprint2008 Well-Known Member

    Messages:
    611
    Likes Received:
    15
    Best Answers:
    2
    Trophy Points:
    140
    Digital Goods:
    1
    #2
    wow serious question you have goin there.
    But i thought of the same stuff before when I wanted to make a IP locator to tell me where visitors were coming from. My research turned up the fatc that most of the programs that identify the IP to a city , state etc .. they are using databases.

    The visitor enters your site, their ip is read with PHP by a variable like $ip = $_SERVER['REMOTE_ADDR'];
    it then compares that IP# to the matching IP in the database and then if there is a match , it pulls out the rest of the information for city , state, etc.

    if youre going to do it the way youre attempting, I'm asusming you will have to generate each IP in each range by creating a ++ add on number to the IP ranges ..which could be somewhat difficult. First you'll need to create the array of all the IP's that are incremented by +1 ..up to the IP ranges end point so like if the ip being incremented and generated is still < (less than ) the last IP in the range, it will continue to generate by increments of +1 ...but if its not (else) it will stop.

    Thats why i would assume you would do it an easier , yet somwhat time-consuming way.
    enter all the IPs into a database. Not the ranges, but literally have them all typed out with the city, state, country in each table column. and then just match the users IP , with the database IP.
    (which would make it very similar to a typical username and password combination. where you check the database for a match. )

    Thats my best opinion on that. if anybody else has anything feel free

    P.S. IF you do all that and create a database with the accurate states, cities, countries... let me know I'd like to have a copy. lol :)
     
    ezprint2008, Oct 2, 2008 IP