开发者

Create a dynamic Tv guide in PHP

开发者 https://www.devze.com 2023-03-25 02:39 出处:网络
I want to creat a simple Tv Guide for my Tv site.. I have the guide that looks like this 5.30-6.00: Program 16.00 -7.00: Program 2

I want to creat a simple Tv Guide for my Tv site.. I have the guide that looks like this

  • 5.30-6.00: Program 1
  • 6.00 -7.00: Program 2
  • My question is simp开发者_开发百科le.. how do I set that at 5.30 the current program will be Program 1 (somthing like.. You are currently watching program 1) Please remember timezones in your answer


    You can write a JavaScript which use the

    var date = new Date();
    var time = date.getHours() + '.' + date.getMinutes;
    

    and with it, can make an ajax call to get the actual tv-program's name from your php script.

    0

    精彩评论

    暂无评论...
    验证码 换一张
    取 消

    关注公众号