PHP code example of scrawler / database
1. Go to this page and download the library: Download scrawler/database 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/ */
scrawler / database example snippets
nectionParams = array(
'dbname' => 'YOUR_DB_NAME',
'user' => 'YOUR_DB_USER',
'password' => 'YOUR_DB_PASSWORD',
'host' => 'YOUR_DB_HOST',
'driver' => 'pdo_mysql', //You can use other supported driver this is the most basic mysql driver
);
db()->connect($connectionParams);
$user = db()->create('user');
$user->name = 'test user';
$user->age = 12;
$user->save();