PHP code example of notcod / sophia
1. Go to this page and download the library: Download notcod/sophia 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/ */
notcod / sophia example snippets
$name = "sophia";
$version = "1.2";
$zip_file = $name . '-' . $version . '.zip';
file_put_contents($zip_file, file_get_contents("https://github.com/notcod/$name/archive/$version.zip"));
$zip = new ZipArchive;
$res = $zip->open($zip_file);
if ($res === TRUE) {
$zip->extractTo(dirname(__FILE__));
$zip->close();
unlink($zip_file);
echo 'cool!';
} else {
echo 'doh!';
}