

![]() |
| ![]() | |||||||
|
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Platinum Lifetime Member Last Online: 07-19-2009 03:48 PM iTrader: (6) Join Date: Dec 2006
Posts: 218
DNF$: 260 Location: Virginia
Country: | Random html to appear? I want to create a block of html on my home page that is different each time someone refreshes the page. Something like how ads are displayed is what I want. So maybe just adding something like openads to my site would be best. How would you go about this? |
| | |
| Sponsored Ads |
| | #2 (permalink) |
| Missing in action Name: Kate Last Online: Yesterday 06:58 PM iTrader: (41) Join Date: Jul 2005
Posts: 4,626
DNF$: 27,483 Location: front line
Country: | You can do that with a server-side language available on your server for example PHP. It can also be done in javascript provided it's enabled on the client browser (most of the time it is but not always. Also search engines do not have javascript capability and won't see the block). Do you have PHP or another language like ASP enabled on your server so I could build an example ?
__________________ VeryOldNames.com |
| | |
| | #4 (permalink) |
| Missing in action Name: Kate Last Online: Yesterday 06:58 PM iTrader: (41) Join Date: Jul 2005
Posts: 4,626
DNF$: 27,483 Location: front line
Country: | Here is one example: I assume you will keep the blocks of code in external files and have 5 pages numbered 1.html thru 5.html in the same directory (you can adapt the $files variable for your purpose). The script will pick one file at random and display the contents. That's it. PHP Code:
__________________ VeryOldNames.com |
| | |
| | #5 (permalink) |
| DNF Addict Name: Doug Last Online: Yesterday 12:48 PM iTrader: (175) Join Date: Jul 2004
Posts: 6,886
DNF$: 68,548 Location: Florida
Country: | You can also do it from a text file or MySQL database.
__________________ Domain Research Tool - Save $125!! Discounted DNF$ For Sale - Pimp RPG Game Alphabetize.org |
| | |
| | #6 (permalink) |
| Gold Lifetime Member | Kate, I am having the same question but the php is not working for me. I am not a php programmer and am not even sure if I am typing in the directories the correct way. And then also, can I just copy the php and place it between a div tag on an html page? Thanks. |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |