<?php $links = array( 'https://twitter.com/', 'https://facebook.com/'); $randNum = rand(0, 1); header("Location: " . $links[$randNum]);