Random Site link script Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Random Site link script Help

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

    PHP Code:
    // 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>&nbsp;$newssR[0]</a>"
    what will be // function of the Random site

    #2
    Originally posted by videodesihot View Post
    i want to random site function instead of new site added function so any export or gumslon help me .

    PHP Code:
    // 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>&nbsp;$newssr[0]</a>"
    what will be // function of the random site
    order by rand()
    Advertise your mobile site for FREE with AdTwirl

    Comment


      #3
      try this

      this should work

      PHP Code:
      // 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>&nbsp;$newssR[0]</a>";
      Last edited by Loony; 22.07.10, 09:39. Reason: double post
      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-fo...r-your-wapsite

      Comment


        #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

        Comment

        Working...
        X