Looking for a way to find prime numbers in php? I wfound one perl solution here, but it wasn’t perl magic – it was power of regular expressions. Please find code below which will be self-explanatory. <?php /** * Function checks if given number is prime *
Read more →If you need to test a code in browser – try http://ideone.com/ Entry found on http://alouche.net/blog/2009/11/24/ideone-compiler-pastebin/
Read more →PHP Geotagging script Script converts visitor’s ip adress into : country code (2 and 3 letter ISO code) full english country name region code and name currency code used in this country postal code gps coordinates area code dma code metro code and BONUS overall statitics about
Read more →I’ve installed fresh version of Ubuntu 9.04 with Lamp, but I couldn’t send emails outside. Problem was SMTP auth of outgoing server, spending time found http://dbaron.org/linux/sendmail who made my day. Thanks
Read more →Install SSh2 extension for PHP, then you can use class below: <?php /** * Class to deal with sFTP connections * to use install http://php.oregonstate.edu/manual/en/ssh2.installation.php * */ class SFTPConnection { private $connection; private $sftp; public function __construct($host, $port=22) { if (!extension_loaded(‘ssh2′)) { throw new Exception(“Extension ssh2 has
Read more →
Recent comments