PHP Magic Book – Free PHP Scripts, Tutorials and Downloads, PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips

Archive for December, 2009

Protect Hotlink the Right Way Using htaccess

Protect hotlinking the right way. There are content stealers out there who will copy your links and images and display them at their websites in result of which you pay more for bandwidth. If you do not do it the right way, you can block google and feedburner also. Here is a code to do it the right way. Any incoming direct request for your image file, zip file or rar will will display your specified image instead of that.

(more…)

Tags: , ,
Posted in: htaccess
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Hide Ads from Admin at Blog

You can trace which user is logged in. Users at WordPress have levels for access. Admin access level is 10. You can simply trace if the admin is logged in and hide ads from your blog so that admin may not see ads. If you are admin of a blog and post a lot then its a chance that you submit impressions for ads by yourself while checking your posts after publishing. More impressions but less click = less earnings. Hide your ads from you. You definitely don’t want to click your own ads, for sure. That’s why it is useful to hide your own ads from you to reduce load time + avoid impressions you do not want + more earnings.

(more…)

Posted in: General
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Change Default WordPress Gravatar in Comments

If you use a plugin to add avatars to your blog, there might be a setting in the plugin’s options page for choosing the default avatar. If you use WordPress 2.5+, then you probably use a template tag like the following for your avatars.

< ?php echo get_avatar( $comment, 32 ); ?>

You can easily modify this code to show a default customized gravatar to appear if the comment author has no gravater to show.

(more…)

Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Only Allow Your IP to Access Website or Blog Admin

If you are the only owner of any website or blog and want to protect your admin directory then you can allow that admin directory for just your IP and deny from all others. Here it is how.

(more…)

Posted in: Security
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

Hide WordPress WP-Admin Login Page

Here is a code which you can use to hide your wp-admin screen. Change YOURSECRETWORDHERE to something else. It can be any word you want. Just make sure it’s unique and somewhat long. Make it, like, your pets name or something random. Change ADMINFOLDER to the new folder name you want. Letters, numbers, underscores, and dashes only. That ^ in front of it is on purpose. Don’t delete that. Back up your original .htaccess file before making any changes. I am not responsible for any mess up.

(more…)

Posted in: Hacks, WordPress
Post's RSS » RSS 2.0
Post's Comments RSS » RSS 2.0
Respond: Post A Comment

    


  Subscribe Via RSS
  Subscribe Via Email