anyone have these coding randomlink.php or randomlink.txt
Random link coding
Collapse
X
-
Originally posted by wap-lord View Postanyone have these coding randomlink.php or randomlink.txt
Code:$quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; $quotes[] = "LINK GOES HERE"; srand ((double) microtime() * 1000000); $randomquote = rand(0,count($quotes)-1); echo " ".$quotes[$randomquote]."<br/></p>";
-
ok make a randomlink.php
put this in it
<?php
$urls = array("http://site.com" ,"http://site1.com","http://site2.com");
//set the text links
$text = array("java Games " ,"Downloads" ,"New Downloads","chat and downloads Free ");
srand(time());
//set the number in (rand()%3); for however many links there are
$random = (rand()%3);
echo ("<a href = \"$urls[$random]\">$text[$random]</a><br/>");
?>left wap stuff
Comment
-
Originally posted by wap-lord View Postthe $test not showing
i have this script . Just look here.
step 1.
creat a *.txt file with name msg.txt or any other name's which you want
Now just copy and past this code in your msg.txt file
Code:::<a href="http://HeArT.wen9.com">HeArT.wen9.com</a> ::<a href="http://FileWap.co.cc">FileWap - Shere ur file</a> ::<a href="http://Findz.co.cc">Findz - Toplist</a> ::<a href="http://CodingForum.freehostia.com">Coding Forum!</a> ::<a href="http://sexindia.wen9.com">Free Hot Video!</a> ::<a href="http://Im4ChaT.co.cc">Chat site</a>
after this just put this code where you want to show yor rendom link
Code:$xfile = @file("msg.txt"); $random_num = rand (0,count($xfile)-1); $udata = explode("::",$xfile[$random_num]); echo $udata[1];
Now enjoy this scriptSandeep DiL (INDIAN)
Comment
-
a simple code for lavair or same sites
core.php
function random_links()
{
$sec = date(s);
if($sec <2)
{
echo "<a href=\"http://site url \">link name </a><br/>";
}
else if($sec <5)
{
echo "<a href=\"http://site url \">link name </a><br/>";
}
else if($sec <
{
echo "<a href=\"http://site url \">link name </a><br/>";
}
else if($sec <11)
{
echo "<a href=\"http://site url \">link name </a><br/>";
}
else if($sec <13)
{
echo "<a href=\"http://site url \">link name </a><br/>";
}
u can add more and more link by changing $sec<.....
use random_links() to show random links on any page .......
Comment
Comment