Browsing: PHP

PHP Tutorial: How to Check Date is Today Date

Use the following code to check a date whether it is today date. $timestamp = “2022-06-27”; $today = new DateTime(“today”); $match_date = DateTime::createFromFormat( “Y-m-d”, $timestamp ); $match_date->setTime( 0, 0, 0 ); $diff = $today->diff( $match_date ); $diffDays = (integer)$diff->format( “%R%a” ); // Extract days count in interval if ($diffDays != 0) { echo “not today”;…

How to Update Twitter Timeline Using PHP

Guide on this article can be used to post Twitter using PHP. First of all, download source code from http://phpfashion.com/twitter-for-php. Extract downloaded file to your folder. Example: /public_html/twitter-php/. Then we create index.php file with the following code: The first line is to setup variables: username, password, and message. And the next part is to setup…

How to Fix phpFox Error: “Unable to write to temporary folder: /tmp/”

phpFox is social network web-based application which can be used to build online community. I found this error message when installing phpFox: To fix this problem, edit install/include/installer.class.php Find this line: and modify to this: After that, create new folder: Change the folder permission to 777: After that redo phpFox installation http://domain.com/install/index.php And problem will…

How to Install Memcached on Debian / Ubuntu

Memcached is free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. First of all, install memcached dan php5-memcached packages: and then make sure memcached is running with this command: Restart apache web server: Check php5-memcached module using…