Bulk Change Mysql Database Table Prefix

We often need to change all our mysql database table prefix. If there are only one or three tables, that would be very easy for us to change. If there are too many, say 100 mysql tatabase tables. It will take us a lot of time, at the same time we may make mistakes. Any […]

WordPress SEO

We should take care the following points on wordpress seo: 1. meta title: We shoud let wordpress shows different titles for homepage, page, post, categories, very simple, replace the original title related code to <title><?php wp_title(‘&laquo;’, true, ‘right’); ?> <?php bloginfo(‘name’); ?></title> 2. page title Save as meta title, we can use the following code: […]

Blocking access to the login page after three unsuccessful login attempts

Sometimes you need to add an extra protection to password-protected website. This article explains how access to the login page can be restricted after three unsuccessful login attempts. This schema uses visitors IP address to store log attempts in the database and block access to login feature for 30 minutes after third unsuccessful attempt.

Show random ads at phpld

If you’re looking for a simple static solution (an not an entire ad manager) use this add in your init.php after the $tpl = get_tpl(… line

How to show all files under a document and rename the file names?

$dirname=”E:/zhanzhongjie/chengbiao-com/chengbiao-com”; $dir_handle=opendir($dirname); while($file=readdir($dir_handle)) { echo $file.”“; rename(“E:/zhanzhongjie/chengbiao-com/chengbiao-com/”. $file, “E:/zhanzhongjie/chengbiao-com/chengbiao-new/insurance-“.$file); } closedir($dir_handle)

Remove hyperlinks ( A tag) from HTML

Sometimes we want to remove hyperlinks with anker text, sometimes only keep anker text, how to use php to achive this? First, only remove hyperlink, and keep anker text part, the code is: $text = ‘Test paragraph.’;