Last updated: Fri, 09 May 2003


(PHP 4 >= 4.1.0)

aspseek_connect -- Open a connection to searchd


resource aspseek_connect ( [string server])

Returns an ASPseek link identifier on success, or FALSE on failure.

aspseek_connect() establishes a connection to an ASPseek searchd server. The following default is assumed for missing optional parameter: server = 'localhost:12345'.

The server parameter can also include a port number. eg. "hostname:port".

If a second call is made to aspseek_connect() with the same argument, no new link will be established, but instead, the link identifier of the already opened link will be returned.

The link to the server will be closed as soon as the execution of the script ends, unless it's closed earlier by explicitly calling aspseek_close().

Example 1. ASPseek connect example

    $link = aspseek_connect("localhost")
        or die("Could not connect: " . aspseek_error());
    print ("Connected successfully");

See also: aspseek_pconnect() and aspseek_close().

 Last updated: Fri, 09 May 2003