Randomized "links" List

Do you have a page of links on your site? How do you order them? Alphabetically? Chronologically? However it is, the links at the bottom of the list get the short end of the stick. Store your links in a database table and display them in a random order with every page load. Now everybody gets a fair share of time at the top of the list!

Update the first couple lines to specify your host, username, password, and database name. (Better yet, move the mysql_connect line to an external file outside your web directory structure and call it with an include.)
Store your links in a database table called "links" (or change the table name in the snippet). The links table should have fields for the link, title, and descriptive paragraph. Also, a 'status' field set to 'ACTIVE' for each record you want to include.
Put this snippet whereever it is on your page that you want the link list to appear.

Related Scripts

  • "watch Forum" Link On Forum List 1.0.0
    Updates will then be sent to the user if any changes occur. Requirements:· phpBB forum...
  • Get Names Of All "up" Network Interfaces 1.0
    This script uses the SIOCGIFCONF ioctl to obtain a list of interfaces and extracts those names, returning them in a list of strings....
  • Struct "magic"
    Creating objects from CSV file....
  • "safe" Eval 1.1
    This script evaluates constant expressions, including list, dict and tuple using the abstract syntax tree created by compiler.parse. Since compiler do...
  • "digg This Page" Xss
    To include the nice little live-updated Digg widget...
  • Implementing "future"s With Decorators
    This script shows you how to kick off a slow process without waiting around for the result. The process is run in the background until the value is ac...
  • Yubnub "dbsearch"
    "dbsearch" command to search MySQL data...
  • Cutting Text And Adding "..."
    Cut a very long text and add "..."...
  • "slide In" Rss Items
    This script reads RSS feeds from an external source and displays them on your page. Each item appears after a predefined number of seconds by sliding ...
  • Yubnub "checkshortcut"
    "checkshortcut" command to check alias...
  • Php "submit-a-link" Style Script
    This "Submit-A-Link" style script gives you the ability to offer instant links on your site. Your ads appear above and below the links and also on the...
  • "grab" Form Field Text
    This script allows you to create a 'grab text' option adjacent to your textarea within your forms.You can use any of the 3 options, link, butto...
  • Method Call When Exit "with" Statement
    This script provides a context manager that allows the user to specify a method on the passed-in object to be called when the 'with' statement is exit...
  • Yubnub "shortcut"
    "shortcut" command source...
  • "things To Ponder" Quotes
    Let your visitors ponder the meaning behind random quotes of "wisdom" with this fun script. It comes with a list of over 200 quotes, displayed randoml...
  • Donnervogel "smart" Picture Counter
    It will count all users visiting a webpage and store the data inside a text file.The script will then parse the number and replace with images every c...
  • Yubnub "data"
    "data" command to display MySQL data...
  • Min/max "peaks" With Numeric 1.0
    Given a large one-dimensional array, this script breaks it into blocks of contstant length and compute min and max for each block, the so-called ...
  • "tell A Friend" Php Script
    How it works : 1. In any section of your wesite, your visitor can invite its friends to join your mailing list, or just to read about your produc...
  • Using A Wxpython "notebook" With Panels 1.2
    wxPython provides a powerul functionality that allows you to use a "Notebook" user interface with multiple panels - whose interface each is determined...
DMCA Notice-Privacy Policy
2004 - 2013 DownScripts. All rights reserved.