Location: PHPKode > scripts > MegaSpider > megaspider/docs/__filesource/fsource_MegaSpider__example.php.html
<html>
<head>
<title>File Source for example.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">MegaSpider</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_MegaSpider.html" class="menu">class tree: MegaSpider</a> ]
		  [ <a href="../elementindex_MegaSpider.html" class="menu">index: MegaSpider</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_MegaSpider.html">MegaSpider</a><br />
            <br /><br />
                  
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file example.php</h1>
<p>Documentation is available at <a href="../MegaSpider/_spider_example_php.html">example.php</a></p>
<div class="php">
<div class="listing"><pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-doc">/**</span></li>
<li><a name="a3"></a><span class="src-doc">* Project:     MegaSpider : small fun project ;)</span></li>
<li><a name="a4"></a><span class="src-doc">* File:        example.php</span></li>
<li><a name="a5"></a><span class="src-doc">*</span></li>
<li><a name="a6"></a><span class="src-doc">* MegaSpider crawl a site following and retrieving</span></li>
<li><a name="a7"></a><span class="src-doc">* any data that you want to retrive.</span></li>
<li><a name="a8"></a><span class="src-doc">*</span></li>
<li><a name="a9"></a><span class="src-doc">* This library is free software; you can redistribute it and/or</span></li>
<li><a name="a10"></a><span class="src-doc">* modify it under the terms of the GNU Lesser General Public</span></li>
<li><a name="a11"></a><span class="src-doc">* License as published by the Free Software Foundation; either</span></li>
<li><a name="a12"></a><span class="src-doc">* version 2.1 of the License, or (at your option) any later version.</span></li>
<li><a name="a13"></a><span class="src-doc">*</span></li>
<li><a name="a14"></a><span class="src-doc">* This library is distributed in the hope that it will be useful,</span></li>
<li><a name="a15"></a><span class="src-doc">* but WITHOUT ANY WARRANTY; without even the implied warranty of</span></li>
<li><a name="a16"></a><span class="src-doc">* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span></li>
<li><a name="a17"></a><span class="src-doc">* Lesser General Public License for more details.</span></li>
<li><a name="a18"></a><span class="src-doc">*</span></li>
<li><a name="a19"></a><span class="src-doc">* You should have received a copy of the GNU Lesser General Public</span></li>
<li><a name="a20"></a><span class="src-doc">* License along with this library; if not, write to the Free Software</span></li>
<li><a name="a21"></a><span class="src-doc">* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span></li>
<li><a name="a22"></a><span class="src-doc">*</span></li>
<li><a name="a23"></a><span class="src-doc">* For questions, help, comments, discussion, etc., please</span></li>
<li><a name="a24"></a><span class="src-doc">* send e-mail to marcin sznrya : hide@address.com</span></li>
<li><a name="a25"></a><span class="src-doc">* </span></li>
<li><a name="a26"></a><span class="src-doc">* </span><span class="src-doc-coretag">@package</span><span class="src-doc"> MegaSpider</span></li>
<li><a name="a27"></a><span class="src-doc">* </span><span class="src-doc-tag">@desc</span><span class="src-doc"> Spider Example</span></li>
<li><a name="a28"></a><span class="src-doc">* </span><span class="src-doc-coretag">@link</span><span class="src-doc"> http://www.marcinsznyra.info/</span></li>
<li><a name="a29"></a><span class="src-doc">* </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> 2005 Marcin Szymon Sznyra &lt;hide@address.com&gt;</span></li>
<li><a name="a30"></a><span class="src-doc">* </span><span class="src-doc-coretag">@license</span><span class="src-doc"> Public Domain LGPL</span></li>
<li><a name="a31"></a><span class="src-doc">* </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Marcin Szymon Sznyra &lt;hide@address.com&gt;</span></li>
<li><a name="a32"></a><span class="src-doc">* </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: example.php,v 1.0 RC 2005/05/05 08:32:25 MarcinSznyra Exp$;</span></li>
<li><a name="a33"></a><span class="src-doc">*/</span></li>
<li><a name="a34"></a>&nbsp;</li>
<li><a name="a35"></a>    <span class="src-comm">//include the class</span></li>
<li><a name="a36"></a>    <span class="src-inc">require_once</span><span class="src-sym">( </span><span class="src-str">'spider.class.php' </span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a37"></a>    </li>
<li><a name="a38"></a>    <span class="src-comm">//Create Spider Object</span></li>
<li><a name="a39"></a>    <span class="src-var">$Spider </span>= <span class="src-key">new </span><span class="src-id"><a href="../MegaSpider/MegaSpider.html">MegaSpider</a></span><span class="src-sym">( </span><span class="src-sym">)</span><span class="src-sym">;    </span></li>
<li><a name="a40"></a>    </li>
<li><a name="a41"></a>    <span class="src-comm">//Tell Spider what to parse!</span></li>
<li><a name="a42"></a><span class="src-comm">//In example Spider crawl and</span></li>
<li><a name="a43"></a>    <span class="src-comm">//retrieving any www addreses</span></li>
<li><a name="a44"></a>    <span class="src-comm">//and emails from www.phpdoc.org</span></li>
<li><a name="a44"></a>    </li>
<li><a name="a45"></a>    <span class="src-var">$Spider </span><span class="src-sym">-&gt; </span><span class="src-id">assign</span><span class="src-sym">( </span><span class="src-str">'http://www.phpdoc.org/' </span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a46"></a>&nbsp;</li>
<li><a name="a47"></a><span class="src-php">?&gt;</span></li>
</ol></pre></div>
</div>
        <div class="credit">
		    <hr />
		    Documentation generated on Thu,  5 May 2005 11:46:37 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: MegaSpider