Skip to content

Instantly share code, notes, and snippets.

@alexllnk
alexllnk / renew ssl crt with sudo command.txt
Last active July 11, 2019 10:16
renew ssl crt with sudo command
sudo /usr/local/vesta/bin/v-update-letsencrypt-ssl под пользовталем nika
@alexllnk
alexllnk / curl_dont_wait_for_response.php
Last active July 20, 2023 05:32 — forked from m4tlch/curl_dont_wait_for_response.php
Curl without waiting response
<?php
<?php
///amo integra begin
$values = $hook->getValues();
$subject = $modx->getOption('emailSubject', $formit->config, 'form-'.$modx->resource->get('emailSubject'));
$name = $values['name'];
$phone = $values['phone'];
$email = $values['email'];
@alexllnk
alexllnk / respond_and_process.php
Created July 3, 2019 11:40 — forked from kfriend/respond_and_process.php
PHP: Send response and continue processing
<?php
// Buffer all upcoming output...
ob_start();
// Send your response.
echo "Testing response";
// Get the size of the output.
$size = ob_get_length();
@alexllnk
alexllnk / php-soap.php
Created July 3, 2019 11:39 — forked from akalongman/php-soap.php
PHP soap client example
ini_set('soap.wsdl_cache_enabled', 0);
ini_set('soap.wsdl_cache_ttl', 900);
ini_set('default_socket_timeout', 15);
$params = array('param1'=>$param1);
$wsdl = 'http://service_url/method?WSDL';
@alexllnk
alexllnk / gist:9246d5bd28883bf356983579f5db0176
Last active June 28, 2019 07:10
queue requests with flock
public function request_queue_handler(Request $request)
{
header($_SERVER['SERVER_PROTOCOL'].' 200 OK');
$amo_subdomain = $_POST['account']['subdomain'];
$path_structure = '../'.$amo_subdomain.'/queue_files';
$queue_file_prefix = $path_structure.'/queue_file_';
$queue_flag_file = $path_structure.'/queue_flag';
$lead_name = $_POST['leads']['add'][0]['name'];