Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How Does One "turn On" A Website?


  • Please log in to reply
3 replies to this topic

#1 Glunn11

Glunn11

  • Members
  • 262 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Idaho
  • Local time:09:38 PM

Posted 04 March 2008 - 12:36 PM

Hello BC! Man, it's been a while since I've last posted. Anyways, I'm currently expanding my knowledge of website scripting and programming by working on my website for a little school-related radio project I've set up.
Before I do the one-hour show, I must first edit the HTML to
1. Say we are LIVE
2. Connect to the server since it is a shared hosting place

I would like to be able to do this without having to edit the source code on the page each time. Is this possible (I'm thinking PHP may be able to)? Thanks ;)

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:09:38 PM

Posted 04 March 2008 - 01:46 PM

I am assuming by your question that you only want the website accessible at certain times during the day? And at all other times, not accessible? Does that mean not accessible at all? The only way you can do that is if you have access to the server. The server administration can allow or deny access to any of the websites it is hosting. Odds are that you do not have that sort of access though. If I were running a web-server, I wouldn't give anybody that acess.

The next option is to use PHP or something to dynamically create a web portal. When a user comes to the website, the php server checks to see what time it is and delivers the correct page based on the time. During normal operation, the user would get one page, during show times, a different page could be displayed, or some additional content on the main page, such as a link or something.

Alternatively, you could probably use javascript. Using the onload() function, one could use the javascript to see what time it is, and display one page or another, or add content to the main page not visible during normal hours.

The php way would be most useful if the hours of the radio show varied, because your PHP application could read from a simple text file to get the times that the show is to be broadcast. If you wanted to add, remove, or change times, all you would have to change was the text file. The downside is that you then need php capabilities on the server, and you need to code it in php.

The javascript way would work if the php option is not viable. Use an external .js page so that you do not have to alter your HTML.

#3 Glunn11

Glunn11
  • Topic Starter

  • Members
  • 262 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Idaho
  • Local time:09:38 PM

Posted 04 March 2008 - 06:16 PM

Awesome, I think I should be able to roll with that. Thanks =)

#4 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,259 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:08:38 PM

Posted 05 March 2008 - 12:15 AM

Just be sure to include a <noscript></noscript> section for those of us who switch off javascript on most sites (like me).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users