@ -42,3 +42,27 @@ require_once __DIR__ . '/../library/time.php';
// Vendors autoload
require_once __DIR__ . '/../../vendor/autoload.php';
// Connect database
try {
$db = new Database(DB_HOST, DB_PORT, DB_NAME, DB_USERNAME, DB_PASSWORD);
} catch (Exception $e) {
var_dump($e);
exit;
}
// Connect Sphinx
$sphinx = new Sphinx(SPHINX_HOST, SPHINX_PORT);
} catch(Exception $e) {
@ -29,9 +29,6 @@ $public = [
// Begin export
try
{
// Connect DB
// Init API folder if not exists
@mkdir(__DIR__ . '/../public/api');
@ -28,9 +28,6 @@ $debug =
// Transaction begin
$db->beginTransaction();
@ -19,18 +19,6 @@ $debug = [
],
];
// Init Scraper
// Begin
@ -3,18 +3,6 @@
// Bootstrap
require_once __DIR__ . '/../config/bootstrap.php';
// Define response
$response = (object)
[
// Define variables
@ -4,18 +4,6 @@
@ -3,30 +3,6 @@
// Bootstrap dependencies
$request = (object)