Raised This Month: $ Target: $400
 0% 

[help] Time set for public function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 01-06-2015 , 09:03   [help] Time set for public function
Reply With Quote #1

How to set time for enable some function
Ty in advanced
PHP Code:
public Morningtime(id)//6 am 
{
if(
how to set time)
it will excute on Morning
}

public 
Afternoontime(id)//12 pm
{
if(
how to set time)
it will excute on afternoon
}

public 
Nighttime(id)//7 pm
{
if(
how to set time)
it will excute on night time

__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 01-06-2015 at 09:07.
indraraj striker is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-06-2015 , 19:01   Re: [help] Time set for public function
Reply With Quote #2

Get the current time and compare to the target time. The time() function will get you the hour, minute, and second of the day.
__________________
fysiks is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 01-07-2015 , 00:35   Re: [help] Time set for public function
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Get the current time and compare to the target time. The time() function will get you the hour, minute, and second of the day.
thank you got it
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 01-07-2015 , 15:02   Re: [help] Time set for public function
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
Get the current time and compare to the target time. The time() function will get you the hour, minute, and second of the day.
Nice idea , Thx
__________________
SPACE TIME
Kuma77 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode