Here’s how to empty logs that have grown large.
cat /dev/null > 로그파일명
For reference, here’s how to find files by size.
find ./* -size +파일크기
Here’s how to empty logs that have grown large.
cat /dev/null > 로그파일명
For reference, here’s how to find files by size.
find ./* -size +파일크기
We created this tool to monitor whether malicious PHP has been installed through server hacking and to easily check for potentially dangerous code. Write the following code and upload it to your server account. [php] <? /** * Name: Kilho’s…
I used CloudFlare to reduce traffic load, but found that the connection was much slower because its location was LAX (Los Angeles), so I quickly made this to use as a CDN. The server is located in Tokyo (Vultr). The…
When using an Amazon server, retrieving the server IP returns the private IP address. So I made this to get the public IP address. <? if(in_array(substr($_SERVER[‘SERVER_ADDR’], 0, 3), array(‘172’))) if(strrpos(gethostname(), ‘.compute.internal’)!==false) $_SERVER[‘SERVER_ADDR’] = file_get_contents(‘http://169.254.169.254/latest/meta-data/public-ipv4’); echo $_SERVER[‘SERVER_ADDR’]; ?>
Integrated with GnuBoard using the WordPress member database, enabling users to log in and write posts on the board. Subdomain and cookie sharing Save the following source code as “wp-sso.php” on the server where WordPress is installed [PHP]
To convert the existing DB from euc-kr to utf8, after carefully (??) backing it up, I opened it in editplus, and it says it contains characters that may be lost in the current encoding, I ignored it, changed it to…
Because of traffic, I moved the images and Flash files to another server and linked to them. While surfing, I found the source code below and connected jQuery to Google. Modified file: theme/functions.php [PHP] //Making jQuery Google API function modify_jquery()…