Redirect to random url

Homeless queen

Registered Member
Joined
Dec 21, 2019
Messages
56
Reaction score
3
I want a script to redirect to random url list when you visit one link or you click on it
and i found this code that work fine but when i tried to add more links it didn't work
 
i can't post the script that i have because this forum give me an error

this is pastibn /drYe44r1
 
Last edited:
Do you use the same script to your webpage?

Try renaming the second openURL function to openURL2.
 
math.floor will help you here..

also google is your friend this time.

https://www.google.com/amp/s/www.geeksforgeeks.org/how-to-select-a-random-element-from-array-in-javascript/amp/
 
Why would you make a redirect using JavaScript? In PHP is more easy to achieve and the user won't see all URLs.
 
Why would you make a redirect using JavaScript? In PHP is more easy to achieve and the user won't see all URLs.
He may can't use PHP. He may also doesn't know a thing about PHP and want to get in any troubles. But yea, the php way is the safer, and of course easier than js ;)
 
Code:
https://pastebin.com/4tYAkyfD
Write your urls to file url_lst.txt and put it with go.php
Usage:
Code:
<a href="/go.php">Your link Text</a>
 
Why would you make a redirect using JavaScript? In PHP is more easy to achieve and the user won't see all URLs.
Because that's what i've foud
He may can't use PHP. He may also doesn't know a thing about PHP and want to get in any troubles. But yea, the php way is the safer, and of course easier than js ;)
she
 
Back
Top