title: Strip html to remove all js/css/html tags to give actual text(displayed on browser) to use it for indexing and search
body: <p>I have tried strip_tag but it still leaves inline js : (function(){..}) and also inline css #button{}</p>
  
  <p>I need to extract pure text from html without any JS function or styling or tags so that I can index it and use for for my search functionality.</p>
  
  <p>html2text also doesnt seem to solve the problem!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>PHP Code:</p>
  
  <pre><code>$url = "http://blog.everymansoftware.com/2011/11/development-setup-for-neo4j-and-php_05.html";
  
  $fileHeaders = @get_headers($url);
  if( $fileHeaders[0] == "HTTP/1.1 200 OK" || $fileHeaders[0] == "HTTP/1.0 200 OK")
          {
              $content = strip_tags(file_get_contents($url));
          }
  </code></pre>
  
  <p>OUTPUT :</p>
  
  <p>$content = </p>
  
  <pre><code>(function() { var a=window,c="jstiming",d="tick";var e=function(b){this.t={};this.tick=function(b,o,f){f=void 0!=f?f:(new Date).getTime();this.t[b]=[f,o]};this[d]("start",null,b)},h=new e;a.jstiming={Timer:e,load:h};if(a.performance&amp;&amp;a.performance.timing){var i=a.performance.timing,j=a[c].load,k=i.navigationStart,l=i.responseStart;0=k&amp;&amp;(j[d]("_wtsrt",void 0,k),j[d]("wtsrt_","_wtsrt",l))}
  try{var m=null;a.chrome&amp;&amp;a.chrome.csi&amp;&amp;(m=Math.floor(a.chrome.csi().pageT));null==m&amp;&amp;a.gtbExternal&amp;&amp;(m=a.gtbExternal.pageT());null==m&amp;&amp;a.external&amp;&amp;(m=a.external.pageT);m&amp;&amp;(a[c].pt=m)}catch(n){};a.tickAboveFold=function(b){var g=0;if(b.offsetParent){do g+=b.offsetTop;while(b=b.offsetParent)}b=g;750&gt;=b&amp;&amp;a[c].load[d]("aft")};var p=!1;function q(){p||(p=!0,a[c].load[d]("firstScrollTime"))}a.addEventListener?a.addEventListener("scroll",q,!1):a.attachEvent("onscroll",q);
   })();
  
  
  
  
  
  
  
  
  
  
  
  Everyman Software: Development Setup for Neo4j and PHP: Part 2
  
  
  
  #navbar-iframe { display:block }
  
  
  
  
  
  
  if(window.addEventListener) {
      window.addEventListener('load', prettyPrint, false);
    } else {
      window.attachEvent('onload', prettyPrint);
    }
  var a=navigator,b="userAgent",c="indexOf",f="&amp;m=1",g="(^|&amp;)m=",h="?",i="?m=1";function j(){var d=window.location.href,e=d.split(h);switch(e.length){case 1:return d+i;case 2:return 0
  
  
  
  2011-11-05
  
  
  
  
  
  
  
  Development Setup for Neo4j and PHP: Part 2
  
  
  
  
  
  This is Part 2 of a series on setting up a development environment for building projects using the graph database Neo4j and PHP. In Part 1 of this series, we set up unit test and development databases.  In this part, we'll build a skeleton project that includes unit tests, and a minimalistic user interface.
  
  All the files will live under a directory on our web server. In a real project, you'll probably want only the user interface files under the web server directory and your testing and library files somewhere more protected.
  
  Also, I won't be using any specific PHP framework.  The principles in t
  </code></pre>