Posts in 'Coding'
SQLite, MySQL, PHP: Ternary operator (IF() statement) in MySQL and SQLite
Posted on 03. Feb, 2010 by Dragos.
While working on a proxy checker tool for one of my projects, I was struggling on how to execute a conditional query on my SQLite database to update a column only if its value is greater than 0 (it would be pointless in my case to let the script update the column with negative values). [...]
Continue Reading
Programming: Google programming language is now real! Go GO Google!
Posted on 12. Nov, 2009 by Dragos.
First the Google Browser (Chrome), then the Google mobile operating system (Android), Google is getting really close to launching its own (and hopefully open source) operating system for computers. But before that, we needed to expect a “default” programming language from the Goliath of all technological times. And it’s here! GO is the name of [...]
Continue Reading
PHP: How to download a webpage (aka web scrapping) with PHP
Posted on 03. Oct, 2009 by Dragos.
There are many ways of downloading web pages, or web content. Personally I like to use cURL for my web scrapping needs, but sometimes I also use fsockopen and file_get_contents. Here are 3 different functions that will allow you to download web content. cURL: function getData($url) { if($url!='localhost' && $url!='http://localhost') { $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $url); [...]
Continue Reading
WordPress: Best SEO iTranslator for WordPress, get free traffic from fully automated plugin script
Posted on 04. Sep, 2009 by Dragos.
I’ve just decided to publish my translation plugin for WordPress. It has helped me a lot to get free traffic, so I think other people might find it also useful. == Description == Best SEO iTranslator for WordPress is a translation plugin, fully automated, that will help you get new traffic and at the same [...]
Continue Reading
WordPress 2.8.4: Not ready to be installed with PHP 5.3 ?
Posted on 01. Sep, 2009 by Dragos.
I’ve just tried to install WordPress 2.8.4 on my testing machine (PHP 5.3). Right on the installation page a dozen of errors filled my screen, something like: Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with that of Walker::start_lvl() in /opt/lampp/htdocs/wordpress/wp-includes/classes.php on line 1214 This is not a big issue and it doesn’t interrupt the [...]
Continue Reading
PHP: How to get creation time of file with PHP on Linux machines
Posted on 01. Sep, 2009 by Dragos.
Unfortunately it is not possible to get the creation time of a file on Linux machines. None of the functions fileatime,filemtime or filctime will return the file creation time. Note: Note also that in some Unix texts the ctime of a file is referred to as being the creation time of the file. This is [...]
Continue Reading
PHP:ob_start() Display page at once, forget about cookie,headers sent too early errors
Posted on 21. Aug, 2009 by Dragos.
If you want to display your web pages at once, not subsequently, and reduce the “headers already sent, cannot send cookie information” errors, add ob_start() at the start of your script. This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the [...]
Continue Reading
PHP: Script to extract one’s contacts from email (Gmail, Yahoo,Hotmail,AOL…) and send invites – OpenInviter to go!
Posted on 18. Aug, 2009 by Dragos.
You’ll find many scripts to extract email contacts, but many of these are either commercial or just given as apis. For the last case, it’s good to extract contacts from an email using an external server, because that’ll help reduce the server load, but what if the website providing that service goes down? Not good. [...]
Continue Reading
JavaScript: Send function as a parameter to another function (callbacks)
Posted on 29. Jul, 2009 by Dragos.
I’m sure you’ve seen a lot of code where functions are send as parameters, usually working as function callbacks e.g: setTimeout(function () { alert('test'); },1000); But how does the function setTimeout execute the passed function as a parameter? The answer is simple, but I need to provide you an example to understand it Let’s create [...]
Continue Reading
JavaScript: GIFless animation. Animate images,logos with jQuery
Posted on 23. Jul, 2009 by Dragos.
After playing some time with position relative and absolute, I’ve noticed one a great aspect of the png image format (probably gif images are also good, but since we are trying to create a GIFless animation, I won’t use any gif images in this tutorial). So here’s a a PNG (transparent text), with the name [...]


