home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / bb98.exe / SOinit.php < prev    next >
PHP Script  |  2002-09-02  |  763b  |  30 lines

  1. <?php if (!defined("SOinit")) { define("SOinit", 1);
  2.  
  3. include("SOhttp.php");
  4.  
  5. //    Initialize the connection (just needed before calling any other
  6. //        of these functions like retrieving Excel data)
  7. //    Inputs:
  8. //        $sAddr: address of BadBlue server (e.g., "127.0.0.1:8080")
  9. //    Outputs:
  10. //        $errmsg: empty if no error occurred, otherwise error message
  11. //
  12. function SOInit($sAddr) {
  13.     $errmsg = "";
  14.     do {
  15.  
  16.         //    Just do a search for dummy data... this will kick off the
  17.         //        one-time load of the indexes.
  18.         //
  19.         $sURL = "http://".$sAddr."/ext.dll?MfcISAPICommand=LoadPage&page=search.htx&a0=xyzzy&a1=0&a2=1&a3=6";
  20.         $errmsg = SOHTTPGet($sURL, &$sPage, "", "");
  21.         if (strlen($errmsg)) {
  22.             break;
  23.         }
  24.  
  25.     } while (0);
  26.     return ($errmsg);
  27. }
  28.  
  29. } ?>
  30.