Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ideas for randommybb.com
#4
(11-17-2009, 06:59 PM)Master of The Universe Wrote: That's actually a good idea, and it's even easy to do.

PHP Code:
<?php

/*****************************************************************************
    @Name: Random MyBB Forum Preview
    @Author: NinjaGeek
*****************************************************************************/

$randomPage rand(0,255);

if(!
$searchResponse file_get_contents("http://www.google.com/search?q=intext%3A+\"Powered+By+MyBB\"&start={$randomPage}")) {
    exit;
}

$matches null;

preg_match_all("/<h3 class=r><a href=\"http:\/\/(.*?)\/(.*?)\"/"$searchResponse$matches);

print 
file_get_contents("http://".$matches[1][rand(09)]);

?>


edit: I forgot to say that thie script above will not work right if your user starts browsing the forum, the links are mostly not pointing to the forum it self but to a page on your site.
Awesome idea Grizzly and ninja geek thanks for the script i've tested it and it's brilliant.
Reply


Messages In This Thread
Ideas for randommybb.com - by Brainless Control - 11-17-2009, 04:02 AM
RE: Ideas for randommybb.com - by Grizzly - 11-17-2009, 05:27 PM
RE: Ideas for randommybb.com - by Gaijin - 11-17-2009, 06:59 PM
RE: Ideas for randommybb.com - by Brainless Control - 11-18-2009, 07:38 AM
RE: Ideas for randommybb.com - by manipulate - 11-18-2009, 07:54 AM
RE: Ideas for randommybb.com - by Gaijin - 11-18-2009, 08:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  any ideas for members to become active? cyberninja 4 1,020 02-18-2010, 02:59 AM
Last Post: cyberninja
  randommybb.com Brainless Control 10 2,588 11-19-2009, 04:17 AM
Last Post: Nathan

Forum Jump:


Users browsing this thread: 1 Guest(s)