joe123 Posted March 29, 2008 Share Posted March 29, 2008 Hello all I just want to check if your country is selected by default from the drop down menu when you visit http://www.hosting777.com/clients/register.php Just to check the accuracy of the ip to country database Thanks for your Feedback ! Joe Link to comment Share on other sites More sharing options...
PPH Posted March 29, 2008 Share Posted March 29, 2008 Worked for me. US Link to comment Share on other sites More sharing options...
apollo1 Posted March 29, 2008 Share Posted March 29, 2008 Worked for me in Canada! How did you accomplish this mr.scott? Link to comment Share on other sites More sharing options...
DF-Duncan Posted March 29, 2008 Share Posted March 29, 2008 Did not work for me, UK Link to comment Share on other sites More sharing options...
chickendippers Posted March 29, 2008 Share Posted March 29, 2008 Didn't work for me either; UK. Link to comment Share on other sites More sharing options...
joe123 Posted March 29, 2008 Author Share Posted March 29, 2008 UK can you please try it again and let me know? Thanks Link to comment Share on other sites More sharing options...
chickendippers Posted March 29, 2008 Share Posted March 29, 2008 Yup, very nifty Link to comment Share on other sites More sharing options...
dordal Posted March 29, 2008 Share Posted March 29, 2008 Worked for me in Canada! How did you accomplish this mr.scott? Yes, how was this done? Link to comment Share on other sites More sharing options...
joe123 Posted March 29, 2008 Author Share Posted March 29, 2008 Yes, how was this done? http://ip-to-country.webhosting.info/node/view/5 Link to comment Share on other sites More sharing options...
dordal Posted March 29, 2008 Share Posted March 29, 2008 Thats cool. Did you write some custom code for your template to use that? Would you be willing to share it? Link to comment Share on other sites More sharing options...
joe123 Posted March 29, 2008 Author Share Posted March 29, 2008 Thats cool. Did you write some custom code for your template to use that? of course i did what do you think it's working without code ? Would you be willing to share it? it is still in a test and not fully finished and when the time comes i will . I still need some more feedback from other countries . Link to comment Share on other sites More sharing options...
Berenguer IV Posted March 30, 2008 Share Posted March 30, 2008 Worked for me in Spain. Link to comment Share on other sites More sharing options...
H2H Posted March 30, 2008 Share Posted March 30, 2008 Worked for me in Australia! Link to comment Share on other sites More sharing options...
dsaunier Posted March 30, 2008 Share Posted March 30, 2008 Worked for me in France, displayed "France or Monaco" which is fine. Good resource you pointed to, but obviously if you wrote some code you're willing to share I'll be happy to not reinvent the wheel given that I provide some custom code myself before ;-) Link to comment Share on other sites More sharing options...
joe123 Posted March 30, 2008 Author Share Posted March 30, 2008 if anyone out there is willing to write a complete ReadMe file with the following , i will share it immediately after that . To avoid questions and how to , the read me file have to include the following 1- how to create the database table and fields with phpmyadmin (http://ip-to-country.webhosting.info/node/view/54) 2-how to import the database into the database (phpmyadmin) 3-how to update the database to the latest in the future (http://ip-to-country.webhosting.info/node/view/6) 4- writing the changes made in clientregister.tpl or order-signup.tpl then i will provide you with the following ready to use: php File javascript file clientregister.tpl I know some of the above will be asked so let's avoid it and i am really bad in writing documentations. ANY Volunteers lazy people? Link to comment Share on other sites More sharing options...
Zorro67 Posted March 30, 2008 Share Posted March 30, 2008 Joe AU worked A.OK. Bit snowed under to help this week but happy to contribute in about 10 days, unless you get a better offer . Link to comment Share on other sites More sharing options...
robb3369 Posted March 30, 2008 Share Posted March 30, 2008 Here are the creation files I have created so far based on a few items: 1. Your existing WHMCS database is called whmcs 2. The new WHMCS table will be mod_iptocountry 3. Root can run wget command Run the following from a command prompt while logged into server as root: cd /tmp wget http://ip-to-country.webhosting.info/downloads/ip-to-country.csv.zip unzip ip-to-country.csv.zip mv ip-to-country.csv iptocountry.csv rm -f ip-to-country.csv.zip chown mysql.mysql iptocountry.csv chmod 666 iptocountry.csv Create a file called iptocountry.sql and add these contents: CREATE TABLE IF NOT EXISTS `mod_iptocountry` ( `IP_FROM` double NOT NULL default '0', `IP_TO` double NOT NULL default '0', `COUNTRY_CODE2` char(2) NOT NULL default '', `COUNTRY_CODE3` char(3) NOT NULL default '', `COUNTRY_NAME` varchar(50) NOT NULL default '', KEY `CODE` (`IP_FROM`,`IP_TO`,`COUNTRY_CODE2`) ) ENGINE=MyISAM; TRUNCATE `mod_iptocountry`; LOAD DATA INFILE '/tmp/iptocountry.csv' INTO TABLE `mod_iptocountry` FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; OPTIMIZE TABLE `mod_iptocountry`; SELECT COUNT(*) AS Total FROM `mod_iptocountry`; Finally, run this command to create the table in the whmcs database and populate it: mysql --database=whmcs < /tmp/iptocountry.sql After running, your out should shold look like this: Table Op Msg_type Msg_text mod_iptocountry optimize status OK Total 81315 The last two lines indicate the number to entries within the new/updated table. As long as your table structure doesn't change, you can safely run the last command over and over with no issues... As a side note, I'm going to do this same thing with the MaxMind City based data... http://www.maxmind.com/app/geolitecity via pecl... Link to comment Share on other sites More sharing options...
charliez Posted July 19, 2008 Share Posted July 19, 2008 Doesn't work for Mexico... Link to comment Share on other sites More sharing options...
Sitetech Posted July 19, 2008 Share Posted July 19, 2008 NL did not work. Link to comment Share on other sites More sharing options...
joe123 Posted July 19, 2008 Author Share Posted July 19, 2008 this is an old post , and the script was removed from that form and used somewhere else , the script s under "User Contribution" if you want to use it Link to comment Share on other sites More sharing options...
thecubehost Posted July 20, 2008 Share Posted July 20, 2008 Didn't work for my. I am in Canada, and the coutry in the select country menu is US. Link to comment Share on other sites More sharing options...
dutchnet Posted July 20, 2008 Share Posted July 20, 2008 Did not work for me either I'm in Holland Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted July 20, 2008 WHMCS CEO Share Posted July 20, 2008 Closed by request from the author. The script was apparently removed from the above form and is available in the user contributions forum category. Matt Link to comment Share on other sites More sharing options...
Recommended Posts