Coding a Web Page To Show New Items on Each Visit

by ky999
4 replies
How Do I code a page that will show something new for each visit or refresh.

I noticed on a lot of freelance jobs I get, they will say go to this page wwwdotsometing and get a keyword from there......

Well each time the page loads, it shows a fresh "keyword". How can I code a page to offer a new piece of text for each page load.

Does this make sense? Is it easy to do. It seems like I did something like this for alternating banner ads in the past, but I can't remember -- and I lost that hard drive
#coding #items #page #script #show #visit #web #web page
  • Profile picture of the author muratsal
    you can do it with sessions variable you can set a variable that showed text id
    and when refresh the page control the session variable and increare or decrease id
    my be also use random number
    {{ DiscussionBoard.errors[7373983].message }}
  • Profile picture of the author kenzik
    Originally Posted by ky999 View Post

    How Do I code a page that will show something new for each visit or refresh.

    I noticed on a lot of freelance jobs I get, they will say go to this page wwwdotsometing and get a keyword from there......

    Well each time the page loads, it shows a fresh "keyword". How can I code a page to offer a new piece of text for each page load.

    Does this make sense? Is it easy to do. It seems like I did something like this for alternating banner ads in the past, but I can't remember -- and I lost that hard drive
    What you are describing is what most server-side languages provide. PHP, ASP.NET, JSP, etc.

    In order to make such dynamic web-sites, you'll generally need to go beyond HTML and JavaScript. This isn't completely true, because with things like JQuery, you can create plenty of dynamic sites, provided that you have another site you can grab information from.

    But in reality, 99.99999% of all sites that provide any reasonable amount of dynamic content are using a server side language of some sort.

    You are going to have to learn how to program PHP probably at a minimum (and it is probably one of the easiest if not the most prevalent framework) to accomplish what you'd like to do. Given that it is free, can be edited on notepad, and is supported by virtually all hosting companies, it is an easy choice.

    Alternatively, you can hire someone to do it for you.
    {{ DiscussionBoard.errors[7380036].message }}
    • Profile picture of the author ky999
      Hi, I am not going to be able to learn PHP in order to alternate an image or link or keyword on an html page. I'm too dumb for that. Thanks anyway. I will try to visit a javascript site or something. I've lost a lot of memory on this for some reason. I appreciate the suggestions, though, so thank for trying to help me out.
      {{ DiscussionBoard.errors[7415431].message }}
  • Profile picture of the author CreateSoft
    With JavaScript (or jQuery), you should be able to randomize the content (or keyword) of the page each time it loads. If you have a large enough list of keywords the odds are pretty small that you will have the same page show up twice in a row.
    {{ DiscussionBoard.errors[7416255].message }}

Trending Topics