Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible
#11
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][Image: safer.gif][/url]
Reply
#12
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
Reply
#13
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][Image: safer.gif][/url]
Reply
#14
Just give me your html code (before 6:15 and after 6:15) and I'll insert it
B 4 EVER
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)