Random Site link script Help

Started on the old forum in July 2010 · view the original in the archive · old links redirect here

#random

3 replies · 600 views · started 16 years ago · 1 min read

3 participants
akela Senior · 305 posts #1

i want to random site function instead of new site added function so any export or Gumslon help me .

// function of the new site 
$r=mysql_query("SELECT link FROM users ORDER BY uid DESC");
$new=mysql_fetch_array($r);
$new[0]=htmlspecialchars($new[0]);
$new1 = str_replace("http://","",$new[0]);
$rr=mysql_query("SELECT uid FROM users ORDER BY uid DESC");
$newss=mysql_fetch_array($rr);
$newss[0]=htmlspecialchars($newss[0]);
$rrR=mysql_query("SELECT site_name FROM users ORDER BY uid DESC");
$newssR=mysql_fetch_array($rrR);
$newssR[0]=htmlspecialchars($newssR[0]);
echo "<div class='titleMain'><div class='titleSubLeftBottom'>Newest Site</div></div> <a href='stat.php?uid=$newss[0]'><span style='color: rgb(255, 0, 0);'>»</span> $newssR[0]</a>";

what will be // function of the Random site

External image (may be gone) Unlimited Web Hosting service. 99.99 $ uptime Guarantee. Free Trail Available for 30 days. Free Script | Null script| Php | Unlimited Web Hosting| Unlimited Space | Unlimited Bandwidth| Unlimited Domain| $3/m Unlimited Space | Unlimited Bandwidth|5 Domain| $2/m 10 GB Space | 100 GB Bandwidth| 1 Domain| $1/m FFMPEG| FREE SCRIPT | FREE SITE BUILDER |LIVE SUPPORT [Timewebhosting.com On Web Hosting| Unlimited Web Hosting](http://www…

GumSlone Administrator Principal · 1,690 posts #2

videodesihot wrote: i want to random site function instead of new site added function so any export or gumslon help me .

// function of the new site 
$r=mysql_query("select link from users order by uid desc");
$new=mysql_fetch_array($r);
$new[0]=htmlspecialchars($new[0]);
$new1 = str_replace("http://","",$new[0]);
$rr=mysql_query("select uid from users order by uid desc");
$newss=mysql_fetch_array($rr);
$newss[0]=htmlspecialchars($newss[0]);
$rrr=mysql_query("select site_name from users order by uid desc");
$newssr=mysql_fetch_array($rrr);
$newssr[0]=htmlspecialchars($newssr[0]);
echo "<div class='titlemain'><div class='titlesubleftbottom'>newest site</div></div> <a rel='nofollow' href='stat.php?uid=$newss[0]'><span style='color: Rgb(255, 0, 0);'>»</span> $newssr[0]</a>";

what will be // function of the random site

order by rand()

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

Loony Senior · 258 posts #3

try this

this should work

// function of the new site 
<? 
$r=mysql_query("SELECT link FROM users ORDER BY RAND()"); 
$new=mysql_fetch_array($r); 
$new[0]=htmlspecialchars($new[0]); 
$new1 = str_replace("http://","",$new[0]); 
$rr=mysql_query("SELECT uid FROM users where link=$new"); 
$newss=mysql_fetch_array($rr); 
$newss[0]=htmlspecialchars($newss[0]); 
$rrR=mysql_query("SELECT site_name FROM users WHERE link=$new"); 
$newssR=mysql_fetch_array($rrR); 
$newssR[0]=htmlspecialchars($newssR[0]); 
echo "<div class='titleMain'><div class='titleSubLeftBottom'>Newest Site</div></div> <a href='stat.php?uid=$newss[0]'><span style='color: rgb(255, 0, 0);'>»</span> $newssR[0]</a>";  

Creator of Epix.Mobi

Keep an Eye on us Big things coming soon!!!! Need something for your site hit me up here http://coding-talk.com/forum/main-forums/marketplace/153110-free-features-for-your-wapsite

akela Senior · 305 posts #4

i try but that code r not working. above function defined for new site. for demo Besttop.mobi. all site should be randomly disply, not only new site. please help

External image (may be gone) Unlimited Web Hosting service. 99.99 $ uptime Guarantee. Free Trail Available for 30 days. Free Script | Null script| Php | Unlimited Web Hosting| Unlimited Space | Unlimited Bandwidth| Unlimited Domain| $3/m Unlimited Space | Unlimited Bandwidth|5 Domain| $2/m 10 GB Space | 100 GB Bandwidth| 1 Domain| $1/m FFMPEG| FREE SCRIPT | FREE SITE BUILDER |LIVE SUPPORT [Timewebhosting.com On Web Hosting| Unlimited Web Hosting](http://www…

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close