/usr/bin/flock -w 600 /var/tmp/myscript.lock /root/myscript.sh
How do I use it?
Download a precompiled binary or build from source
Create your HTML document that you want to turn into a PDF (or image)
Run your HTML document through the tool.
For example, if I really like the treatment Google has done to their logo today and want to capture it forever as a PDF:
wkhtmltopdf http://google.com google.pdf
$data = [];
foreach($array as $item) {
if ($item['category_id'] == $item['parent_id']) $data[] = $item;
}
// http://site.ru/post?id=1&value=2
$id = $request->get('id'); // 1
$value = $request->get('value'); // 2
$array = $request->all(); // ['id' => 1, 'value' => 2]