If you are still new in web designing and web development, you must be familiar with HTML code. And as i writing this, now the new HTML standard is HTML 5. Read my article HTML5 the next generation of web to know more about HTML5 standard.If you are still new or still learning to code HTML, there are a few most common mistake in HTML code that you might do:Don’t forget to put the DOCTYPE The Doctype describes what kind of HTML you are using. If it’s not there, you don’t know if … Read more...
Image Watermarking Using PHP
There are someways to protect your copyrighted images. One way is use watermark image so when someone copy your image, it is hard to remove the watermark and they cannot use it for their own benefit without asking your permission. In other words, digital image watermark is one way of anti piracy technique to protect your image copyright.There are 2 types of digital image watermark, visible and invisible watermark. Visible watermark is embed your digital sign or logo to your original images. … Read more...
[TIPS] Convert Your Numbers To Human Readable Format
Sometimes your code produce a large numbers which is hard for user to read it. For example 17753392783 bytes or 18293753038 unit. For human eyes, it is easier to get 17MB or 1 million rather than lot of numbers.I write this as quick tips for you, in case you want to convert your data to human readable format. I do this in PHP, for other programming language you can get the algorithm and convert it to your own language:Usage:Thank you for read this article. Good luck and have a … Read more...
[TIPS] Write print_r() Output To File
When debugging a php application, print_r() or var_dump() often use to display the data inside the variable, usually an array that store many data inside. print_r() is core php function to displays information about a variable in a way that's readable by humans. Not just a variable or an array, we can trace or display protected and private properties of objects in PHP 5.But when the php application is called by the curl or other remote connection (not using a web browser), print_r() won't … Read more...
Things You Can Do With PHP cURL
Curl is a command line tools to transfer data using various protocol. Curl project was released with libcurl, which is a library for curl that can be use in multi programming language. But it is widely use for PHP with PHP Curl library."curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP. curl supports SSL certificates, HTTP POST, … Read more...
Keep PHP Process Upon Closed Client Connection
PHP process as default will stop or terminate the process when the client close the connection or process timeout. When user stop the process through browser it will automatically send abort header, and PHP will turn on the abort flag, so the process the currently running will be force to stop. As well as the process timeout met, the PHP will eventually stop the process too.I had one case that i should fire another script with Curl library in PHP. But since the other script took a very long … Read more...
[HowTo] Replace String In Mysql With One Query
Yesterday i was helping my friend's blog. She want to change her domain and move her hosting server for some reasons. She is using wordpress as her blog engine and of course using mysql as database server. To move wordpress blog to another domain you need to change some configuration on the database file. Especially if the data have the absolute path in url (ex: http://www.willbechange.com/bla/bla/post.html).After examine her database file i found that many of data in wp-options using … Read more...
[HowTo] Install ImageMagick/Imagick For PHP On Ubuntu
Installing ImageMagick on Ubuntu with PECL is really simple. But i want to share with you how to install it beside to remind myself someday, if i forget how to install it. ImageMagick is a php library for image processing. But they are not developed just for PHP library only, now they have library for Ruby, Perl, Phyton, etc. You can visit their official website here.Let's continue to how to install ImageMagick/Imagick on Ubuntu:Open your terminal Install php-pear if you don't install … Read more...
[TIPS] Get File Extension Easily in PHP
I want to share a tips for you to get file extension in PHP easily. Before i always use the old way to get the file extension, that is using substring and find the last "." (dot), and get the extension. For those who still doing this, i have a tips for you to get the extension easier.You can use pathinfo, with pathinfo you can get information about a file path, here is the example how to use it:That's it! Thank you for visiting my blog and have a nice day... … Read more...
[Tutorial] Groovy and Grails Part 2 – Installing Grails
This is the next article from Grovvy and Grails Part 1 - Introduction that you can read it here. Now we continue to install grails in your machine. Before you continue, there are some requirements to run Grails in your machine, so please read it carefully :)Requirements to install Grails: Java SDK 1.4 or higher and have set your JAVA_HOME variable to the SDK install location. note here, Java OpenSDK and JRE is not working with Grails. Apache Ant 1.6.5 or higher * JUnit (to run the … Read more...