PHP code example of spider / spider

1. Go to this page and download the library: Download spider/spider library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spider / spider example snippets


$connection = new Connection([
    'driver' => 'neo4j'
    'hostname' => 'localhost'
    'port' => 7474,
    'username' => 'root',
    'password' => 'root'
]);

$query = new Spider\Commands\Query($connection);

$characters = $query
    ->select('name, position, catch_phrase')
    ->from('characters')
    ->where('show', 'Firefly')
    ->orderBy('name')
    ->all();
    
foreach ($characters as $character) {
    $character->name; // Wash
    $character->position; // Pilot
    $character->catch_phrase; // "I am a leaf on the wind."
}