[SCRIPT] Automatic Date Changer - TESTED !
2015-02-08, 09:29 AM,
(This post was last modified: 2015-02-08, 09:30 AM by WhiteHatSEO.)
#1
Hi Everyone ,

Just want to share a script i use on my sites

that changes date and time AUTOMATICALLY EVERY DAY.

Last Updated: (todays date, automatically changed every day)


How to make the date change automatically:
Just paste this code wherever you want it to display :

Code:
<b>Last Updated On:
</b><script type="text/javascript"> var d=new Date(); var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday", "Saturday"); var monthname=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); document.write(weekday[d.getDay()] + " "); document.write(d.getDate() + ". "); document.write(monthname[d.getMonth()] + " "); document.write(d.getFullYear());</script>

For wordpress sites , you have paste into the theme editor files.
Latest Thanks - View all

honeydew(2016-04-07 04:46 PM) JaxTeller(2015-07-24 11:33 PM) TotalTrue(2015-02-10 11:40 PM) 
Reply
2015-02-08, 09:30 AM,
#2
Thanks. Can this be use in blogger post? Like I paste it to html editor?
Latest Thanks - View all

honeydew(2016-04-07 08:26 PM) 
Reply
2015-02-08, 09:48 AM,
#3
(2015-02-08, 09:30 AM)WarAffiliate Wrote: Thanks. Can this be use in blogger post? Like I paste it to html editor?


Definitely , Works in the HTML Editor perfectly , Try It!
Reply
2015-02-08, 09:52 AM,
#4
(2015-02-08, 09:48 AM)TheSEOGuru Wrote:
(2015-02-08, 09:30 AM)WarAffiliate Wrote: Thanks. Can this be use in blogger post? Like I paste it to html editor?


Definitely , Works in the HTML Editor perfectly , Try It!

Thanks I will be adding it to my next landing page. Thank you thank you :)
Reply
2015-02-08, 12:07 PM,
(This post was last modified: 2015-02-08, 01:07 PM by BlackHatSEO.)
#5
(2015-02-08, 09:29 AM)TheSEOGuru Wrote: For wordpress sites , you have paste into the theme editor files.

Don't use this JavaScript code on Wordpress sites, use one single PHP date() call for this instead.

Google can't recognize all parts of JavaScript code (like Flash, too), so it's worthless if you want to have the date of the last update being displayed for SEO purposes or inside the snippet. PHP is being interpreted at server side. Wordpress is written in PHP, so there is no problem with a lack of PHP support.

This place is intentionally left blank.
Reply
2015-02-08, 12:19 PM,
#6
(2015-02-08, 12:07 PM)BlackHatSEO Wrote:
(2015-02-08, 09:29 AM)TheSEOGuru Wrote: For wordpress sites , you have paste into the theme editor files.

Don't use this JavaScript code on Wordpress sites, use one single PHP date() call for this instead.

Google can't recognize all parts of JavaScript code (like Flash, too), so it's worthless if you want to have the date of the last update being displayed for SEO purposes or inside the snippet. PHP is being interpreted at server side. Wordpress is written in PHP, so there is no problem with a lack of PHP support.

A guy named "The SEO Guru", claiming to be "the best SEO" in another thread, should really know this.
I'm using WP for multiple niches site. Can you share PHP script? It would be very appreciated.
Reply
2015-02-08, 12:39 PM,
#7
(2015-02-08, 12:19 PM)hieu230592 Wrote: I'm using WP for multiple niches site. Can you share PHP script? It would be very appreciated.

I don't want to hijack this thread. But I'm going to post it for you personally, because you requested a post. ;-)

Code:
<b>Last Updated On: <?php echo date("l j. M Y"); ?></b>


Note 1: "l" is the lower letter "L"


Note 2: This code works only if the timezone setting of Wordpress (or other PHP based scripts) is done, otherwise a warning (no error) is displayed.


Note 3: You can easily customize the output, please have a look here:

http://php.net/manual/en/function.date.php

Personally I use:

Code:
<b>Last updated on: <?php echo date("l, j. F Y"); ?></b>

This place is intentionally left blank.
Reply
2015-02-08, 12:42 PM,
#8
Thanks guys, this is one of the trick to let others about the new updates.

[Image: ytsrcpae_500x90.jpg]
Reply
2015-02-08, 12:56 PM,
#9
(2015-02-08, 12:42 PM)Krrish Wrote: Thanks guys, this is one of the trick to let others about the new updates.

BTW: If you want to rank at Google with your article and want to reduce the bounce rate, then insert my PHP code (a bit modified) into your "description" meta-tag.

Example:

Code:
<meta name="description" content="<?php echo date("j.m.Y"); ?> - This website offers ... ">

This won't work with JavaScript.

This place is intentionally left blank.
Reply
2015-02-08, 03:05 PM,
#10
BlackHatSEO

I`ve added your PHP script code inside my Wordpress post and it doesn`t show.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [GET] No hands PROXIES paid version for free 1.17.0.0 Latest Version Working 100% TESTED! DEADZ 12 3,150 2017-10-17, 11:27 AM
Last Post: lingapalm
  [Blackhat Method] Make $100/day for being a DRAMA QUEEN. "Tried and Tested" rap8557 49 16,020 2017-10-13, 01:45 AM
Last Post: yassiyoh
  [FREE] Cloak Script Watt 37 2,418 2017-10-06, 10:03 AM
Last Post: Watt
  [GET] Script To Boost Alexa Rank akwin 21 4,808 2017-10-05, 02:37 PM
Last Post: iastaff
  Fake Movie Player Script for Blogspot for PPI, PPD or CPA dahilan01 94 21,335 2017-10-04, 12:24 AM
Last Post: shimulb0




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top