Check it out at http://www.cinereviews.in/.
]]>The code for the function is:
function getIpInfo($ip){
$ipa=explode(".",$ip);
$ipnum=256*256*256*$ipa[0]+256*256*$ipa[1]+256*$ipa[2]+$ipa[3];
//download the Geo DB file from http://software77.net/geoip-software.htm
$handle = fopen("IpToCountry.txt", "r");
$userinfo=NULL;
while (!feof($handle)){
list ($start, $finish, $a1,$a2,$a3,$a4,$a5) = explode("\t",fgets($handle));
if(($start<=$ipnum)&&($ipnum<=$finish)) {$userinfo=array($a3,$a4,$a5); break; }
}
fclose($handle);
if(!$userinfo) $userinfo=array('Cannot Trace the Ip address','Cannot Trace the Ip address','Cannot Trace the Ip address');
return $userinfo;
}
One just needs to change the name of the file (in my case ‘IpToCountry.txt’) to the one that they have downloaded.The array returns (’2 Digit Country Code’, ‘3 Digit Country Code’, ‘Full Country Name’), and, you can use it to display location or use it in your script as a variable. Make sure you do ip validation befor passing the IP address (ip2long()). A demo of it is available here. For a list of Other PHP/Javascript Demos please go to here.
]]> do_pages($rows, $page_size, "published");
uncommented in index_center.tpl , then defintely download the plugin and give it a try.
]]>I had been looking at Online Newsletter generating services, and, I was surprised to find that they are pretty expensive (around 10$ per month). I spent a day to create the newsletters and sent it through Entourage. Most E-Mail clients cannot send complex HTML E-Mails and usually require some kind of an add-on script. For Entourage I used this, an excellent Script that worked very well.
My newsletter looks great in Entourage,Gmail, YahooMail and Hotmail. Hopefully I will be able to send more of these in the future.
]]>If you would like to change; the name of the site, e-mail address that is used to send password reset info, RSS description and a few other things, go to the libs directory under your Pligg Installation directory and edit lang.conf (basically search for ‘pligg’ and replace it with the name of your site).
Also if you want to edit the header, login as god and from the admin page, click Template editor and edit the header.tpl and in the headbar div add your link (code), you might want to add the code under both the {if} and {else} clauses.
If you would like to create a custom FAQs/about page (why wouldn’t you?) edit the faq-en_center.tpl file.
I am still trying learn how to configure Pligg. Pligg is still not yet perfect, but, very good. I would prefer writing my own code that I can use for my new project, but Pligg gives me a head-start and I will continue to use it for some time.
]]>