FastLizard4's IRC Quote Collection!

FastLizard4's list of all time favorite IRC quotes for infinite loldongs!

Is this interface too complicated for you? Try switching to the simple interface instead!

Please be aware that some (but not all) of the quotes here are NSFW. You may wish to exercise caution when viewing them if you are in the vicinity of bosses, coworkers, children, secret agents, or parents, or if you are yourself a minor. In addition, quotes that aren't outright NSFW often otherwise contain crude/mature humor, offensive jokes, bad language, high-level mathematics, science jokes, Wikipedia jokes, computer programmer jokes, bad puns, politically incorrect material, and/or injokes. You have been warned.

The Quote!


<?php
$quotes
=explode("%%"file_get_contents("quotes.txt"));
$qub=count($quotes)-1;
$qub2=$qub+1;
$execTime = array();
$execTime['start'] = microtime(true);
#ini_set( 'display_errors', 1 );
#error_reporting(E_ALL & ~E_NOTICE);
header("Content-Type: text/html; charset=UTF-8");
function 
absolute_url($page 'index.php') {
    if(!empty(
$_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
        
$url 'https://';
    } else {
        
$url 'http://';
    }
    
$url .= $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/';
    
$url rtrim($url'/\\');
    
$url .= '/' $page;
    return 
$url;
}
if(!isset(
$_COOKIE['nocomments'])) {
    
$_GET['nocomments'] = 1;
}
if(
$_GET['nocomments'] == 1) {
    
setcookie('nocomments''hide') OR die("<h1>Critical System Error</h1>\n
    The cookie could not be set."
);
} elseif(
$_GET['nocomments'] == 2/* && isset($_GET['nocomments'])*/) {
    
setcookie('nocomments''show')  OR die("<h1>Critical System Error</h1>\n
    The cookie could not be set."
);
    
$url absolute_url("index.php?nocomments=3");
    
header("Location: $url");
    exit();
} elseif(
$_GET['nocomments'] == 3/* && isset($_GET['nocomments'])*/) {
    
setcookie('nocomments''show')  OR die("<h1>Critical System Error</h1>\n
    The cookie could not be set."
);
}
//error_reporting(E_ALL);#Remember to uncomment when testing on localhost!
  
$pageTitle "FastLizard4's IRC Quote Collection!";
  
$pageHeading "FastLizard4's IRC Quote Collection!";
  
$pageTagline "FastLizard4's list of all time favorite IRC quotes for infinite loldongs!";
    require_once(
'/var/www/includes/header.php');
  
$simpleString "/bash/simple.php";
  if(
$_GET['q']) {
    
$simpleString .= "?q={$_GET['q']}";
  }
  echo <<<EOF
<p style="font-size: large;">Is this interface too complicated for you?  Try switching to the <a href="{$simpleString}">simple interface</a> instead!
<p style="color: #F00;">Please be aware that some (but not all) of the quotes here are <abbr title="Not Safe For Work">NSFW</abbr>.  You may wish to exercise caution when
viewing them if you are in the vicinity of bosses, coworkers, children, secret agents, or parents, or if you are yourself a minor.  In addition, quotes that aren't outright
NSFW often otherwise contain crude/mature humor, offensive jokes, bad language, high-level mathematics, science jokes, Wikipedia jokes, computer programmer jokes, bad puns,
politically incorrect material, and/or injokes.  You have been warned.</p>
EOF;
if(
$_COOKIE['nocomments'] == "hide" || $_GET['nocomments'] == 1/* && ($_GET['nocomments'] != 2 && isset($_GET['nocomments']))*/) {
    
$nocomments 1;
} elseif(
$_GET['nocomments'] == 2) {
    
$nocomments 0;
} elseif(
$_COOKIE['nocomments'] == "show") {
    
$nocomments 0;
} else {
    
$nocomments 0;
}
if(isset(
$_GET['q'])) {
echo 
"<h2>The Quote!</h2>";
if(
$_GET['q'] == "all") {
    echo 
"<p style=\"color: #F00; font-weight: bold;\">NOTE: You have asked for ALL quotes to be outputted.  This may take some time for your browser to download and/or process, and is really quite long.</p>\r\n";
}
if(
is_numeric($_GET['q'])) {
    
$qPrev $_GET['q'] - 1;
    
$qNext $_GET['q'] + 1;
    if(
$qPrev 0$start true;
    if(
$qNext $qub$end true;
    if(
$_GET['q'] >= && $_GET['q'] <= $qub) {
        echo 
"<p>";
        if(
$start) {
            echo 
"<strong>You are at the first quote.</strong>";
        } else {
            echo 
"<a href=\"index.php?q={$qPrev}\">&lt;&lt;&lt; PREVIOUS QUOTE ({$qPrev})</a>";
        }
        echo 
" | CURRENT QUOTE: {$_GET['q']} | ";
        if(
$end) {
            echo 
"<strong>You are at the last quote.</strong>";
        } else {
            echo 
"<a href=\"index.php?q={$qNext}\">NEXT QUOTE ({$qNext}) &gt;&gt;&gt;</a>";
        }
        echo 
"</p>\r\n";
    }
}
if(
$_GET['q'] == "random") {
    echo 
"<p>You are viewing a random quote.  To view another randomly-selected quote, bonk on the Random Quote button again, or refresh the page.  For a permanent link to the quote you are viewing,\r\n";
    echo 
"look for the \"Quote #<em>nnn</em>\" header at the start of the quote (which should be immediately below).  Clicking the <em>nnn</em> link (where nnn is the quote identifier) will enable\r\n";
    echo 
"navigation using the Previous Quote and Next Quote buttons.</p>\r\n";
}
function 
fixup() { //Broken
/*    GLOBAL $a;
    $rrr=0;
    $a=str_replace("&lt;a", "<a", $a);
    $rrr=1;
    if($rrr == 1) {
        $a=str_replace("&gt;", ">", $a);
    }
    $a=str_replace("&lt;/a&gt;", "</a>", $a);
    $a=str_replace("&lt;i&gt;", "<i>", $a);
    $a=str_replace("&lt;/i&gt;", "</i>", $a); */
    
$lolwut 4//Just to give the function something to do
}
  if(isset(
$_GET['q'])){
    
$quotenum=$_GET['q'];         
    switch(
$quotenum){
    case 
'all':
      echo 
all_quotes();
      break;
    case 
'list':
      echo 
list_quotes();
      break;
    case 
'random':
      echo 
random_quote();
      break;
    case 
'source':
        echo 
viewsource();
        break;
    case 
'search':
        echo 
searchQuotes();
        break;
    default:
      echo 
quote_by_num($quotenum);
      break;
    }
  } else {
    echo 
"Awaiting User Input...";
  }}
  
  
// This function returns a random quote from the quotes.txt file
  
function random_quote() {
    GLOBAL 
$nocomments;
    
$quotes=explode("%%"file_get_contents("quotes.txt"));
    
$qub=count($quotes)-1;
    
$qub=rand(0$qub);
    
$a=$quotes[$qub];
    
$a=str_replace("&""&amp;"$a);
    
$a=str_replace("<""&lt;",$a);
    
$a=str_replace(">""&gt;"$a);
    if(
$nocomments == 1) {
     
$a=str_replace("@$""<!--"$a);
     
$a=str_replace("$@""-->"$a);
    } else {
     
$a=str_replace("@$""<i><font color=\"green\">"$a);
     
$a=str_replace("$@""</font></i>"$a);
     
fixup();
    }
    
$a=str_replace("*$""<a href=\""$a);
    
$a=str_replace("*|*""\">"$a);
    
$a=str_replace("$*""</a>"$a);
    
$a=str_replace("#$""<!--"$a);
    
$a=str_replace("$#""-->"$a);
    
$b=$a;
    
$a="<pre><tt>";
    
$a=$a."<b>Quote #<a href='?q=".$qub."'>".$qub."</a></b>";
    
$a=$a."\r\n".$b."\r\n</tt></pre>";
    return 
$a;
  }

  
// This function returns a quote by its number (first quote is 0, etc)
  
function quote_by_num($n) {
    GLOBAL 
$nocomments;
    
$quotes=explode("%%"file_get_contents("quotes.txt"));
    
$qub=count($quotes)-1;
    if (
$n<$qub+1&&$n>-1) {
      
$qub=$n;
      
$a=$quotes[$qub];
      if (
$a != '') {
        
$a=str_replace("&""&amp;"$a);
        
$a=str_replace("<""&lt;",$a);
        
$a=str_replace(">""&gt;"$a);
        if(
$nocomments == 1) {
         
$a=str_replace("@$""<!--"$a);
         
$a=str_replace("$@""-->"$a);
        } else {
         
$a=str_replace("@$""<i><font color=\"green\">"$a);
         
$a=str_replace("$@""</font></i>"$a);
        }
        
fixup();
        
$a=str_replace("*$""<a href=\""$a);
        
$a=str_replace("*|*""\">"$a);
        
$a=str_replace("$*""</a>"$a);
        
$a=str_replace("#$""<!--"$a);
        
$a=str_replace("$#""-->"$a);
        
$b=$a;
        
$a="<pre><tt>";
        
$a=$a."<b>Quote #<a href='?q=".$qub."'>".$qub."</a></b>\r\n";
        
$a=$a.$b."\r\n";
        
$a=$a."</tt></pre>";
      } else {
        
$a="<div align = \"center\"><span style=\"color: red;\"><b><h1><blink>FAIL!  FAIL!  FAIL!  FAIL!</blink></h1></b></span><br /><span style=\"color: red;\"><b>NOES!  THERE WERE ERRORS IN YOUR FORM!  THE WORLD WILL BLOW UP NOW!!!!  I'D FIX IT IF I WERE YOU!!</b></span></div>";
        
$a="<pre><tt>";
        
$a=$a."<font color='red'>";
        
$a=$a."No such quote [quote identifiers must be numerical]";
        
$a=$a."</font>\r\n</tt></pre>";
      }
    } else {
//        $a="<div align = \"center\"><span style=\"color: red;\"><b><h1><blink>FAIL!  FAIL!  FAIL!  FAIL!</blink></h1></b></span><br /><span style=\"color: red;\"><b>NOES!  THERE WERE ERRORS IN YOUR FORM!  THE WORLD WILL BLOW UP NOW!!!!  I'D FIX IT IF I WERE YOU!!</b></span></div>";
      
$a="<pre><tt>";
      
$a=$a."<b>Quote #<a href='?q=".$n."'>".$n."</a></b>\r\n";
      
$a=$a."<font color='red'>";
      
$a=$a."No such quote [quote out of range]";
      
$a=$a."</font>\r\n</tt></pre>";
    }
    return 
$a;
  }

  function 
list_quotes() {
    
$quotes=explode("%%"file_get_contents("quotes.txt"));
    
$qub=count($quotes)-1;
    
$qub2=$qub+1;
    
$a="There are currently <b>".$qub2."</b> quotes.\r\n";
    
$a=$a."<div style='-moz-column-count:5; column-count:5;'>\r\n<UL>";
    for(
$i 0$i $qub+1$i++) {
      
$a=$a."\r\n<LI><A href='?q=".$i."'>#".$i."</A></LI>";
    }
    
$a=$a."\r\n</UL>\r\n</div>";
    return 
$a;
  }

  
  function 
count_quotes() {
    
$quotes=explode("%%"file_get_contents("quotes.txt"));
    return 
count($quotes);
  }

  function 
all_quotes() {
    
$qub=count_quotes();
    for(
$i 0$i $qub$i++) {
      
$temp=quote_by_num($i);
      if (
$i != $qub-1) { $temp=$temp."<hr />"; }
      
$a=$a.$temp;
    }
    return 
$a;
  }

  function 
searchQuotes() {
    
$count 0;
    
$stack NULL;
    if(!
$_GET['search']) {
        return 
"<pre><tt><font color='#F00'>ERROR: No Search String!</font>\r\n</tt></pre>";
    } else {
//        $_GET['search'] = str_replace(array('<', '>', '&'), array('%26lt;', '%26gt;', '%26amp;'), $_GET['search']);
    
}
    
$needle $_GET['search'];
    
$qub=count_quotes();
    if(
$_GET['type'] == "Search" || !$_GET['type']) {
        for(
$i 0$i $qub$i++) {
            
$temp quote_by_num($i);
            if(
stristr(preg_replace('/\s/'' '$temp), $needle)) {
                
$count++;
                
$stack .= $temp;
                if(
$i != $qub 1) {
                    
$stack .= "<hr />";
                }
            }
        }
        
$a "<strong>{$count} quotes matched your search, \"{$needle}\" (type=fulltext).</strong>\r\n";
        
$a .= $stack;
        return 
$a;
    } elseif(
$_GET['type'] == "Regex Search") {
        for(
$i 0$i $qub$i++) {
            
$temp quote_by_num($i);
            if(
preg_match($needlepreg_replace('/\s/'' '$temp))) {
                
$count++;
                
$stack .= $temp;
                if(
$i != $qub 1) {
                    
$stack .= "<hr />";
                }
            }
        }
        
$a "<strong>{$count} quotes matched your search, \"{$needle}\" (type=perl-compatible regular expression).</strong>\r\n";
        if(
$count == 0) {
            
$a .= "<br /><span style=\"color: #F00; font-weight: bold;\">WARNING: Your search returned no results.  You might want to check the syntax of the regular expression you used.</span>\r\n";
        }
        
$a .= $stack;
        return 
$a;
    } else {
        return 
"<pre><tt><font color='#F00'>ERROR: Unrecognized search type.</font>\r\n</tt></pre>";
    }
  }

    function 
viewsource() {
        echo 
"<pre>";
        
show_source(__FILE__);
        echo 
"</pre>";
    }
?>

<h2>Instructions</h2>
<p><b>Here you shall find the collected <a href="http://meta.wikimedia.org/wiki/BASH">works of m:BASH</a> and some other quotes from elsewhere that I have found particularly funny.</b></p>

<p>Use the quote selection box in the sidebar (or at the bottom of the page) to select the quote you want!</p>

<h3>Searching Quotes</h3>
<p>You can now search (yes, by text) through the quotes database to locate quotes!  Useful if you were looking for a certain quote, but only remember a word or two in it.  Just see the "search" section in the sidebar to the left
or at the bottom of the page (generally, it's in the sidebar).  Note that there are two buttons, Search and Regex Search.  Use the Search button if you just want to perform a standard fulltext search on the term you entered.
However, if you are familiar with Perl-Compatible Regular Expressions (AKA PCREs or pregs), you can instead enter a regex and use the Regex Search button.  Remember to include the delimiters if you're using a regex!</p>

<p><strong>NOTE:</strong> If you wish to search for <code>&gt;</code>, <code>&lt;</code>, or <code>&amp;</code> in either a regex search or a normal search, you must use <code>&amp;gt;</code>, <code>&amp;lt;</code>,
or <code>&amp;amp;</code>, respectively.</p>

<h3>Quote Comments</h3>
<p>
<b>About Comments:</b> Comments (not actually part of the quote) are wrapped in @$ and $@ in the raw quotes file, however,
these comments are normally hidden (shown as HTML comments when the source code is viewed) when the quote is parsed by the program
and shown to you below.  However, you can "show" the comments, causing them to appear inline with the quote as <i><font color="green">green
italicized text</font></i>.  To show/hide the comments, see the controls in the sidebar.
Everything wrapped in #$ and $# in the quotes file are always shown as HTML comments.  The cookie that contains the setting will expire at the
end of the session (when you close your browser).  By default, the comments are hidden.</p>

<h3>WARNING</h3>
<div id="warning"><strong>Warning:</strong> Some of these quotes contain language unsuitable for children, BASH commands unsuitable for Windows users, and humor unsuitable for non-Wikipedians or those with an <a href="index.php?q=418">expired copy of sense of humor</a> (which can be updated by running <code>sudo apt-get upgrade</code> or by running <code>sudo /usr/bin/humor --get-updates</code> in your brain's shell).</div>

 <h2>Attribution</h2>
  This program's code adapted from the <a href="http://toolserver.org/~mike/quotes/?q=code">Wikipedia PHP Quote Tool</a> <sup>[<em>no longer online :(</em>]</sup> devloped by Michael Billington.

<h2>Report Bugs, Request Features</h2>
<p>Found a bug?  Want a new feature added?  File a bug with <a href="/bugzilla/">LizardBugs</a>!  Remember to select product LizardQuotes when reporting bugs.  Note that login or registration is required to report bugs on LizardBugs.<br />
Note that this is <strong>NOT</strong> for requesting new quotes be added to the database.</p>

<div class="printfooter"></div> 
                <div class="visualClear"></div> 
    </div> 
</div></div> 
<div id="column-one"> 
<div id="p-cactions" class="portlet">
        <h5>Views</h5>
        <div class="pBody">
            <ul>
<?php
if($_GET['q'] != "source") {
    
$nstab 'class="selected"';
} else {
    
$vs 'class="selected"';
    
$nstab 'class="selected"';

}
?>
                 <li id="ca-nstab-main" <?php echo $nstab?>><a href="/bash/index.php" title="View the quotes! [ctrl-alt-c]" accesskey="c">Quotes Database</a></li>
                 <li id="ca-nstab-talk"><a href="/bash/simple.php" title="Use the simple quotes interface">Simple Interface</a></li>
                 <li id="ca-edit" <?php echo $vs?>><a href="/bash/index.php?q=source" title="You can view this script's source code [ctrl-alt-e]" accesskey="e">View Source</a></li>
            </ul>
        </div>
    </div>
    <div class="portlet" id="p-logo"> 
        <a style="background-image: url(/w/images/Logo.png);" href="/wiki/Main_Page" title="Visit the main page"></a> 
    </div> 
    <script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script> 
    <div class='generated-sidebar portlet'> 
        <h5>Quote Selection</h5>
        <div class='pBody'>
<ul><li><a href="index.php?q=list">List quotes</a></li><li><a href="index.php?q=random">Random Quote</a></li><li><a href="index.php?q=all">View all quotes</a></li></ul>
<?php
/*if(!empty($_GET['q'])) {
    echo "<a href=\"#quote\"><b><font color=\"red\">Show me the quote!</font></b></a>";
}
    if(!empty($_GET['q'])) {
        echo "<p class=\"really-obnoxious\">Scroll down to see the quote!</p>";
    }*/
?>
<ul><li><b><form>Get quote by number </b>(0 - <?php echo $qub?>)<b>: </b></li></ul><input type='search' id='searchInput' name='q' /><input type='submit' value='Submit'></form><ul>
<?php
echo "<li>There are currently <b>$qub2</b> quotes in the quote database.</li>";
if(
$_COOKIE['nocomments'] == "hide" || $_GET['nocomments'] == 1/* && ($_GET['nocomments'] != 2 && isset($_GET['nocomments']))*/) {
    
$nocomments 1;
    echo 
"<li><a href=\"index.php?nocomments=2\">Show comments (Cookies must be enabled)</a></li>";
} elseif(
$_GET['nocomments'] == 2) {
    
$nocomments 0;
    echo 
"<li><a href=\"index.php?nocomments=1\">Hide comments</a></li>";
} elseif(
$_COOKIE['nocomments'] == "show") {
    
$nocomments 0;
    echo 
"<li><a href=\"index.php?nocomments=1\">Hide comments</a></li>";
} else {
    
$nocomments 0;
    echo 
"<li><a href=\"index.php?nocomments=1\">Hide comments</a></li>";
}
?>
<li><a href="quotes.txt">View quotes in raw format</a></li>
</ul>
<?php
/*if($_GET['nocomments'] == 1 && !empty($_GET['nocomments'])) {
    $nocomments = TRUE;
    $checked1 = " checked=\"checked\"";
} else {
    $nocomments = FALSE;
    $checked2 = " checked=\"checked\"";
}*/
/*echo "
<input type= \"radio\" name=\"nocomments\" value= \"0\"$checked2 /> Show comments
<input type= \"radio\" name=\"nocomments\" value= \"1\"$checked1 /> Hide comments */
echo "
</form>"
?>
        </div>
    </div>
        <div class='generated-sidebar portlet' id='p-navigation'>
                <h5>Navigation</h5>
                <div class='pBody'>
                        <ul>
                                <li id="n-mainpage"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z">Return to LizardWiki's Main Page</a></li>
                                <li id="n-Terms-of-Service"><a href="/wiki/LizardWiki:Terms_of_Service">Terms of Service</a></li>
                                <li id="n-Copyright-information"><a href="/wiki/LizardWiki:Copyrights">Copyright information</a></li>
                        </ul>
                </div>
        </div>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
        <div id="f-copyrightico"><a href="http://creativecommons.org/licenses/by-sa/3.0/"><img src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" alt="Attribution-Share Alike 3.0 Unported" width="88"
height="31" /></a></div>
        <div id="f-poweredbyico">
                <a href="//fastlizard4.org/wiki/LizardNet"><img src="//fastlizard4.org/w/images/0/05/LizardNet_small.png" alt="Powered by LizardNet" width="88" height="31" /></a>
        </div>
        <ul id="f-list">
                <li id="copyright">Content is available under <a href="/wiki/LizardWiki:Copyrights" title="LizardWiki:Copyrights">Attribution-Share Alike 3.0 Unported</a>.</li>
                <li id="note">Stylesheets used on this page adapted from the MediaWiki Monobook skin.  <a href="http://mediawiki.org">MediaWiki: We Make Wikipedia Tick!</a>
                <li id="privacy"><a href="/wiki/LizardWiki:Privacy_policy" title="LizardWiki:Privacy policy">Privacy policy</a></li>
                <li id="about"><a href="/wiki/LizardWiki:About" title="LizardWiki:About">About LizardWiki</a></li>
                <li id="disclaimer"><a href="/wiki/LizardWiki:General_disclaimer" title="LizardWiki:General disclaimer">Disclaimers</a></li>
        </ul>
</div>
</div>

<script>if (window.runOnloadHook) runOnloadHook();</script>
<?php
$execTime
['end'] = microtime(true);
$execTime['true'] = $execTime['end'] - $execTime['start'];
echo 
"<!-- Served in {$execTime['true']} seconds. -->";
?>
</body></html>

Instructions

Here you shall find the collected works of m:BASH and some other quotes from elsewhere that I have found particularly funny.

Use the quote selection box in the sidebar (or at the bottom of the page) to select the quote you want!

Searching Quotes

You can now search (yes, by text) through the quotes database to locate quotes! Useful if you were looking for a certain quote, but only remember a word or two in it. Just see the "search" section in the sidebar to the left or at the bottom of the page (generally, it's in the sidebar). Note that there are two buttons, Search and Regex Search. Use the Search button if you just want to perform a standard fulltext search on the term you entered. However, if you are familiar with Perl-Compatible Regular Expressions (AKA PCREs or pregs), you can instead enter a regex and use the Regex Search button. Remember to include the delimiters if you're using a regex!

NOTE: If you wish to search for >, <, or & in either a regex search or a normal search, you must use &gt;, &lt;, or &amp;, respectively.

Quote Comments

About Comments: Comments (not actually part of the quote) are wrapped in @$ and $@ in the raw quotes file, however, these comments are normally hidden (shown as HTML comments when the source code is viewed) when the quote is parsed by the program and shown to you below. However, you can "show" the comments, causing them to appear inline with the quote as green italicized text. To show/hide the comments, see the controls in the sidebar. Everything wrapped in #$ and $# in the quotes file are always shown as HTML comments. The cookie that contains the setting will expire at the end of the session (when you close your browser). By default, the comments are hidden.

WARNING

Warning: Some of these quotes contain language unsuitable for children, BASH commands unsuitable for Windows users, and humor unsuitable for non-Wikipedians or those with an expired copy of sense of humor (which can be updated by running sudo apt-get upgrade or by running sudo /usr/bin/humor --get-updates in your brain's shell).

Attribution

This program's code adapted from the Wikipedia PHP Quote Tool [no longer online :(] devloped by Michael Billington.

Report Bugs, Request Features

Found a bug? Want a new feature added? File a bug with LizardBugs! Remember to select product LizardQuotes when reporting bugs. Note that login or registration is required to report bugs on LizardBugs.
Note that this is NOT for requesting new quotes be added to the database.