title: Bash.org Quote Of The Day
body: <p>So i've been working on my website in which i'd like to add a random quote each time the page is loaded from bash.org, i <em>Kinda</em> got it working but i was thinking about using "preg_replace" instead of "array_splice" to get rid of the header and footer of the page. With the code im currently using it get rid of just the header and i cant figure out how to get rid of the footer. Please Help!</p>
  
  <p>Code i currently have</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Chris's Website&lt;/title&gt;
      &lt;link href="lesson_3_css.css" type"text/css" rel="stylesheet"/&gt;
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;style type="text/css"&gt; body, a, a:hover {cursor: url(http://q3ait.org/~bogauschc/WorkInProgress/test/proxy/cur116.cur), progress; scrollbar-3dlight-color:#FFFFFF; scrollbar-arrow-color:#FFFFFF; scrollbar-base-color:#FF9900; scrollbar-darkshadow-color:#333333; scrollbar-face-color:#FF9900; scrollbar-highlight-color:#FFFFFF; scrollbar-shadow-color:#000000;}
  body {
      background-image: url(Speaker%20Fire.png);
  }
  .title div {
      color: #F00;
  }
  &lt;/style&gt;
  
  &lt;script language="JavaScript"&gt;
  function clock(){
  var time = new Date()
  var hour = time.getHours()
  var minute = time.getMinutes()
  var second = time.getSeconds()
  var ampm = " PM "
  if (hour &lt; 12){
  ampm = " AM "
  }
  if (hour &gt; 12){
  hour -= 12
  }
  if (hour &lt; 10){
  hour = " " + hour
  }
  if (minute &lt; 10){
  min = "0" + minute
  }
  if (second &lt; 10){
  second = "0" + second
  }
  document.clockForm.clockBtn.value = hour + ":" + minute + ":" + second + ampm
  setTimeout("clock()", 1000)
  }
  window.onload=clock;
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div class="title"&gt;
        &lt;div align="center"&gt;
          &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  
              &lt;td align="left"&gt;&lt;form name="clockForm"&gt;
            &lt;input type="button" name="clockBtn" value=" " /&gt;
          &lt;/form&gt;
          &lt;a&gt;&lt;img src="http://www.reliablecounter.com/count.php?page=bogauschc.no-ip.org&amp;digit=style/plain/4/&amp;reloads=0" border="2"&gt;&lt;/a&gt;
          &lt;/br&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;div class="nav"&gt;
    &lt;p&gt;&lt;a href="http://q3ait.org/~bogauschc/html"&gt;HTML files&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="http://turntable.fm/mayor_bees_room"&gt;My Turntable&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="http://q3ait.org"&gt;Q3AIT&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="http://www.chathamcentralschools.com/hs/"&gt;Chatham High&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="http://q3ait.org/~bogauschc/WorkInProgress"&gt;Work In Progress&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="games.html"&gt;Games&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;&lt;a href="webcams.html"&gt;Webcams&lt;/a&gt;&lt;/p&gt;
  
  &lt;/div&gt;
      &lt;div class="main" align="center"&gt;
  &lt;/br&gt;
      &lt;p&gt;Im Chris and I Can Do Things!&lt;/p&gt;
      &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;?php
  if(!$_GET['n']) {
  $num = rand(1,400);
  $open = fopen("http://bash.org/?".$num, "r");
  $line = file("http://bash.org/?".$num);
  array_splice($line, 0, 83);
  array_splice($line, 89, 200);
  foreach ($line as $line_num =&gt; $line) {
  echo $line;
  }
  }
  ?&gt;
  &lt;p&gt;&amp;nbsp;&lt;/p&gt;
  &lt;iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FChriss-Website%2F218161641601802&amp;amp;width=292&amp;amp;height=62&amp;amp;colorscheme=light&amp;amp;show_faces=false&amp;amp;border_color&amp;amp;stream=false&amp;amp;header=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:62px;allowTransparency="true"&gt;&lt;/iframe&gt;
          &lt;p&gt;&amp;nbsp;&lt;/p&gt;
          &lt;script language="JavaScript"&gt;
              VIH_BackColor = "palegreen";
              VIH_ForeColor = "navy";
              VIH_FontPix = "16";
              VIH_DisplayFormat = "You are visiting from:&lt;br&gt;IP Address: %%IP%%&lt;br&gt;Host: %%HOST%%";
              VIH_DisplayOnPage = "yes";
      &lt;/script&gt;
  &lt;script language="JavaScript" src="http://www.hashemian.com/js/visitorIP.js.php"&gt;&lt;/script&gt;
  
      &lt;p&gt;&lt;a href="IndexOf.html"&gt;Index Of Files For This Page&lt;/a&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>here is an example of a bash quote <a href="http://bash.org/?47" rel="nofollow">http://bash.org/?47</a>
  My website is <a href="http://q3ait.org/~bogauschc/" rel="nofollow">http://q3ait.org/~bogauschc/</a></p>
  
  <p>Thats the entire index.php, if you can help get rid of the header and footer it would be much appreciated!</p>
  
  <p>--
  Chris</p>