Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Input Geo Data Ip to Mysqli Data Base
- ▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
- if ( 'You Need More' == TRUE || 'You Need More' == 1 )
- {
- GOTO http://www.fl-y.com/ifyouneedmore
- }
- endif
- ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲
- <?php
- echo ini_get("memory_limit")."\n";
- ini_set("memory_limit","256m");
- echo ini_get("memory_limit");
- $link = mysqli_connect("127.0.0.1", "root", "", "geoip");
- $link2 = mysqli_connect("127.0.0.1", "root", "", "geoip");
- set_time_limit(0);
- echo memory_get_usage();
- $query = mysqli_query($link, "select substring_index(ip_start,'.',1), substring_index(substring_index(ip_start,'.',2),'.',-1), substring_index(substring_index(ip_start,'.',-2),'.',1), substring_index(ip_start,'.',-1), substring_index(ip_end,'.',1), substring_index(substring_index(ip_end,'.',2),'.',-1), substring_index(substring_index(ip_end,'.',-2),'.',1), substring_index(ip_end,'.',-1), id from `dbip_edu`");
- $data = mysqli_fetch_row($query);
- do{
- $ip_start_1 = $data[0];
- $ip_start_2 = $data[1];
- $ip_start_3 = $data[2];
- $ip_start_4 = $data[3];
- $ip_end_1 = $data[4];
- $ip_end_2 = $data[5];
- $ip_end_3 = $data[6];
- $ip_end_4 = $data[7];
- $start_total = ($ip_start_1 * 16777216) + ($ip_start_2 * 65536) + ($ip_start_3 * 256) + $ip_start_4;
- $end_total = ($ip_end_1 * 16777216) + ($ip_end_2 * 65536) + ($ip_end_3 * 256) + $ip_end_4;
- mysqli_query($link2, "update `dbip_edu` set rem_ip_start = '$start_total', rem_ip_end = '$end_total' where rem_ip_start is null and ipv6 = 0 and id = '$data[8]'");
- }while($data);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement