Home Forum
2024-03-28
Benvenuto, Ospite
Nome Utente Password: Ricordami

Redirect to list of URLs
(1 Online) (1) Ospite
  • Pagina:
  • 1

ARGOMENTO: Redirect to list of URLs

Redirect to list of URLs 10 Anni, 11 Mesi fa #3554

  • nforse
  • Offline
  • Fresh Boarder
  • Messaggi: 1
Hi I looked through the forum and help files and couldn't find anything specific to my question.

Is it possible with MACROS to redirect to a specific list of URLs? Sometimes 1 or 3 or 4 different URLs.
Currently I'm redirecting to a PHP file that decides which URL to randomly show.

I'm hoping there is someway of doing this directly in ReDJ?

Any help is much appreciated.

Here's the PHP file I'm using

<?php

$link[1] = "www.URL1.com";

$link[2] = "www.URL2.com";

$link[3] = "www.URL3.com";

if(!isset($HTTP_cookie_VARS['link'])){ $n=count($link);

$rand=rand(1,$n); setcookie("link",$rand,time()+1500);

header('location:'.$link[$rand]); }else{ $go=$link[$_COOKIE['link']]; header('location:'.$go); }

?>
L'Argomento è stato bloccato.

Re: Redirect to list of URLs 10 Anni, 11 Mesi fa #3555

  • admin
  • Offline
  • Administrator
  • Messaggi: 1603
Hi,
it is not possible with macros, but should be easy to add a new macro that chooses a random placeholder. Something like:

$link1=http://www.url1.com
$link2=http://www.url2.com
$link3=http://www.url3.com
$link={random}${link1},${link2},${link3}{/random}


The only "issue" here is you have a full random behaviour, no cookie storage at all.

Kind regards,
Luigi
Ultima modifica: 10 Anni, 11 Mesi fa Da admin.
L'Argomento è stato bloccato.
  • Pagina:
  • 1
Moderatori: admin
Tempo generazione pagina: 0.39 secondi
Cerca con Google
News
Chi è online
 51 visitatori online
Sponsor

slotmachineaamsonline.com è una guida alle migliori slot machine online legali in Italia. Sul sito trovi un elenco sempre aggiornato dei casino online con Slot machine e bonus slot, le ultime novità dal mondo delle slot online e le migliori strategie per vincere. Inoltre, è disponibile una sezione dedicata alle slot machine da BAR che finalmente sono disponibili nella versione online.