Include funtion e. This will escape malicious js stuff.
function e($value)
{
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
}
<input type="text" value="<?=e($_GET['q']??'')?>">
function e($value)
{
return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false);
}
<input type="text" value="<?=e($_GET['q']??'')?>">
for %f in (*.*) do echo %f
If there is space in files and you need to call some toolfor %f in (*.*) do call MyTool "%f"
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
innodb_buffer_pool_size=2048M (50% of your ram)
max_connections=100
key_buffer_size=256M
max_allowed_packet=256M
innodb_buffer_pool_size = 2G
innodb_log_buffer_size = 256M
innodb_log_file_size = 1G
innodb_write_io_threads = 16
innodb_flush_log_at_trx_commit = 0
thenmysql -uroot -p dbname < /var/www/mydb.sql
composer require facebook/graph-sdkNote: this command is good at the moment of this article. But you better go to github and copy, because they can change it.
$appId = ''; //your App Id
$appSecret = ''; //your app secret
$pageId = '0000000000'; //id of the page you want to publish on
$userAccessToken = ''; //Your never expire user access token
$fb = new \Facebook\Facebook([
'app_id' => $appId,
'app_secret' => $appSecret,
'default_graph_version' => 'v3.0',
]);
$linkData = [
'link' => 'http://google.com', //TODO change
'message' => "My message", //TODO change
];
$longLivedToken = $fb->getOAuth2Client()->getLongLivedAccessToken($userAccessToken);
$fb->setDefaultAccessToken($longLivedToken);
$response = $fb->sendRequest('GET', $pageId, ['fields' => 'access_token'])
->getDecodedBody();
$foreverPageAccessToken = $response['access_token'];
$fb->setDefaultAccessToken($foreverPageAccessToken);
$response = $fb->post("/$pageId/feed", $linkData);
Note: If you're using github then values for first 4 variables should be outside of git. For example in env file or php file which is in gitignore.