Posts: 538
Threads: 62
Joined: Apr 2003
Quote:Code:
<?php
// Get the time
$currentTime = localtime(time(), 1);
$secs = $currentTime(tm_sec);
$mins = $currentTime(tm_min);
$hours = $currentTime(tm_hour);
// Check if it's later than 6:15
if ( $hours >= 6 && $mins >= 15 )
{
?>
// Here comes the HTML-Code for the time after 6:15
<?php
}
else
{
?>
// Here comes the HTML-Code for the time before 6:15
<?php
}
?>
is there a way for the code to be left alone before 6:15 i asume you just leave that bit empty?
and how do you get it to change the file no url is present
url=http://www.spreadfirefox.com/?q=affiliates&id=0&t=79]
[/url]
Posts: 594
Threads: 11
Joined: Oct 2002
Quote:ak00ma Wrote:Code:
<?php
// Get the time
$currentTime = localtime(time(), 1);
$secs = $currentTime(tm_sec);
$mins = $currentTime(tm_min);
$hours = $currentTime(tm_hour);
// Check if it's later than 6:15
if ( $hours >= 6 && $mins >= 15 )
{
?>
// Here comes the HTML-Code for the time after 6:15
<?php
}
else
{
?>
// Here comes the HTML-Code for the time before 6:15
<?php
}
?>
is there a way for the code to be left alone before 6:15 i asume you just leave that bit empty?
and how do you get it to change the file no url is present
Look at it:
Code:
<?php
// Get the time
$currentTime = localtime(time(), 1);
$secs = $currentTime(tm_sec);
$mins = $currentTime(tm_min);
$hours = $currentTime(tm_hour);
// Check if it's later than 6:15
if ( $hours >= 6 && $mins >= 15 )
{
?>
<html>
<head>
<title>Test</title>
</head>
<body>
If you see this, it will be 6:15 or later
</body>
</html>
<?php
}
else
{
?>
<html>
<head>
<title>Test</title>
</head>
<body>
If you see this, it will be before 6:15
</body>
</html>
<?php
}
?>
B 4 EVER
Posts: 538
Threads: 62
Joined: Apr 2003
yes but it dosen't appear to edit the script all it does is checks for the time i need somethin that will edit a peice of script after 6:15
url=http://www.spreadfirefox.com/?q=affiliates&id=0&t=79]
[/url]
Posts: 594
Threads: 11
Joined: Oct 2002
Just give me your html code (before 6:15 and after 6:15) and I'll insert it
B 4 EVER