Update Your Copyright Information Automatically

0 Flares 0 Flares ×

This year is coming to an end very soon like every year and the first thing every blogger or webmasters would do is to update their website or blog copyright notice to 2012. So to update the copyright notice what would you do? Either you will update your footer file and upload to your server via FTP or you would login to your cPanel and edit the footer file directly to update the copyright notice to the current year.

But most of the times we forget to update the copyright notice of or website or blogs. So why should worry about updating copyright notice every year if you can update copyright notice automatically.


How to auto update copyright notice


This is a very simple trick and here instead of hardcoding the year in the copyright notice we will dynamically insert the year in the copyright notice. You can use the below line of code to auto update your copyright notice.

                       Copyright &copy; <?php echo date(‘Y’); ?> Website Name

This code will pull the year automatically from the server and display it on the webpage. But you need to make sure that your server date time is correctly set. In most of the cases the server date is always correct. If you have not made your copyright notice dynamic, right time has come for you, this time when updating your copyright notice just add the above code.

Now your blog or website will update the copyright notice every year at the beginning automatically. 


+Ayodhyanath Guru holds a B.Tech degree in Electrical Engineering and has worked with various prestigious clients in the IT industry and presently working as a Software Engineer. He is a part time blogger and presently authors the Jafaloo.Com blog. Being a tech enthusiast Guru likes to surf the web and blogs about interesting technical topics like How-To guides, freewares, Tutorials, Software, Gadgets, web applications etc. Apart from blogging he likes coding in Java/J2EE and PHP.

You may also like...

0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 0 Flares ×