PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Aug 22, 2017 12:32 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Feb 13, 2017 10:27 am 
Offline
Forum Contributor

Joined: Fri Sep 05, 2008 3:34 pm
Posts: 467
Location: Victoria, BC
I have 2 CSV files uploaded to my Linux VM, one is IPv4 and the other is IPv2 and I have 2 tables for them respectively.

The purpose is to be able to build a better ad rotator for global internet traffic

IPv4:
Code:
LOAD DATA LOCAL
   INFILE 'IP2LOCATION-LITE-DB1.CSV'
INTO TABLE
   `ip2location_db1`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;


IPv6:
Code:
LOAD DATA LOCAL
   INFILE 'IP2LOCATION-LITE-DB1.IPV6.CSV'
INTO TABLE
   `ip2location_db1_ipv6`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;


So any ideas on how to update the database dynamically? I was considering mostly IPv4 until IPv6 becomes more widely available.

For now I have them manually setup, but eventually I wanted to use JavaScript and correct the database with a POST command os something

databases are not too large, 24,000 rows for IPv6 is easy to manage

_________________
Hardcore Games Legendary is the Only Way to Play!
Vegan Advocate 16 lbs grain to make only 1 lb meat, water for 6 months of showers and 34.1 lbs carbon dioxide
My sites are made with WordPress, which is a content management system, Joomla and Drupal are some alternatives


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group