Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-02-2003, 06:49 AM   #1
BlueFly
Confirmed User
 
Join Date: Nov 2003
Location: NC, USA
Posts: 716
Help with Java script

I am trying to write a script to redirect traffic to a random url selected from a list of urls. So far, I have had no luck. I don't know a lot about writing scripts. Anyone have a good script for this? TIA
__________________
Now Taking Hard Link Trades
BTW - NEVER use thexxxhost.com
BlueFly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-02-2003, 06:53 AM   #2
chemicaleyes
UNSTOPPABLE
 
chemicaleyes's Avatar
 
Join Date: Aug 2003
Location: UK :: ICQ# 156068
Posts: 11,569
search some script sites, there are loads of free scripts that do that..
__________________
No way as way, No limitation as limitation. AmeriNOC formally PhatServers
chemicaleyes is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-02-2003, 06:57 AM   #3
pudcat
Confirmed User
 
Join Date: Mar 2003
Posts: 1,169
haven't tested it though something like below should be fairly close to working.

sites=Array("url1","url2","....");
window.location=sites[math.round(math.random())*sites.length]
pudcat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-02-2003, 06:57 AM   #4
BlueFly
Confirmed User
 
Join Date: Nov 2003
Location: NC, USA
Posts: 716
Quote:
Originally posted by chemicaleyes
search some script sites, there are loads of free scripts that do that..
I haven't had much luck there... I found one that was close, and butchered it up pretty bad. It did absolutely jak shit when I was done with it.
__________________
Now Taking Hard Link Trades
BTW - NEVER use thexxxhost.com
BlueFly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-02-2003, 07:01 AM   #5
BlueFly
Confirmed User
 
Join Date: Nov 2003
Location: NC, USA
Posts: 716
Quote:
Originally posted by pudcat
haven't tested it though something like below should be fairly close to working.

sites=Array("url1","url2","....");
window.location=sites[math.round(math.random())*sites.length]
That look promising... and a lot easier than what I was messing with. I will dicker with it. Thanks!
__________________
Now Taking Hard Link Trades
BTW - NEVER use thexxxhost.com
BlueFly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-02-2003, 07:13 AM   #6
BlueFly
Confirmed User
 
Join Date: Nov 2003
Location: NC, USA
Posts: 716
Quote:
Originally posted by BlueFly
That look promising... and a lot easier than what I was messing with. I will dicker with it. Thanks!
hmmmm, that one doesn't seem to work.
__________________
Now Taking Hard Link Trades
BTW - NEVER use thexxxhost.com
BlueFly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-02-2003, 07:28 AM   #7
pudcat
Confirmed User
 
Join Date: Mar 2003
Posts: 1,169
sites[Math.round(Math.random()*(sites.length-1))]
pudcat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-02-2003, 07:32 AM   #8
BlueFly
Confirmed User
 
Join Date: Nov 2003
Location: NC, USA
Posts: 716
Quote:
Originally posted by pudcat
sites[Math.round(Math.random()*(sites.length-1))]
That got it! Thanks for your help!
__________________
Now Taking Hard Link Trades
BTW - NEVER use thexxxhost.com
BlueFly is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.