I want to enter into my database the results I get from an external api. The results are in the format: date(comma)IP(comma)interger(space) etc as show in the example below. The last four digits of the IP returned are always .XXX for security.
2010-04-14,208.120.29.XXX,16822 2010-04-14,207.255.139.XXX,4933389 2010-04-14,75.138.118.XXX,837202 2010-04-14,74.103.14.XXX,55335 2010-04-13,207.255.139.XXX,5095034 2010-04-13,98.202.1.XXX,739088 2010-04-13,74.103.14.XXX,220200 2010-04-12,141.165.135.XXX,7574145 2010-04-11,141.165.135.XXX,4858152
I not really sure how to do this but was thinking something like explod the space and then a foreach list($time,$ip,$amount) or something.
then do something like
INSERT INTO table_name ('date', 'ip' , 'amount') VALUES ('date', 'ip', 'amount');
for each of them.
Any advice on how to do this or go about it, as my PHP knowledge is really basic, would be greatly appreciated.
Thanks in advance.