![]() |
![]() |
![]() |
||||
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. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
Script/Code/HTML for redirecting
Hey Guys,
I am redirecting traffic to an url and from there I would like to create/copy a code/script/html (whatever works) so when the traffic comes in, it could not just redirect to 1 url but to randomly use one from a list of url's each time or every 5th time for example. I hope I wrote it clearly. I am trying to explain it the best I can! I would really appreciate some help or advise! Thanks so much! ![]() Laszlo |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jun 2002
Posts: 9,506
|
I use to have a php script that just picked a random url out of a text file to go to. Is this what your talking about ?
__________________
Vacares - Web Hosting, Domains, O365, Security & More Unparked domains burning a hole in your pocket? 5 Simple Ways to Make Easy $$$ from Unused Domains |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
I am still looking for a script. If anyone can help, it would be greatly appreciated. Thanks!
![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
Quote:
Code:
<script type="text/javascript"> var urls = new Array("http://www.url1.com/", "http://www.url2.com/"); function redirect() { window.location = urls[Math.floor(urls.length*Math.random())]; } var temp = setInterval("redirect()", 1000); </script> |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 |
Registered User
Industry Role:
Join Date: Dec 2011
Posts: 10
|
That won't work for users without Javascript, of course.
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: May 2012
Posts: 124
|
here is a very simple example in php
<?php $urls = file('urls.txt'); $rand = array_rand($urls); header("Location: {$urls[$rand]}"); ?> in urls.txt make each line a url this is just a simple example and should be put before output otherwise you technically could put ob_start() at the beginning and supress output |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Industry Role:
Join Date: May 2012
Location: With your mom
Posts: 5,189
|
Better go the php way as above.
![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#10 |
Registered User
Industry Role:
Join Date: Jan 2011
Location: Sydney
Posts: 41
|
This is SEO suicide too, you know that right?
__________________
Raunchy Republic Sex Shop Australia's Favourite Online Adult Store Visit our Sex Blog |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#13 | |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Industry Role:
Join Date: May 2012
Posts: 124
|
no problem. It's very simple but if you need any more help with it just let me know
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#15 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Industry Role:
Join Date: May 2012
Posts: 124
|
ha no problem glad I could help
![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#18 |
Confirmed User
Industry Role:
Join Date: Jan 2012
Location: Europe
Posts: 470
|
|
![]() |
![]() ![]() ![]() ![]() |