• Интеграция IIko в woocommerce. Есть ли у кого-то опыт?

    @johannes_hirshfeld
    Здравствуйте.
    Осталось у кого нибудь?
    Сейчас этот плагин снят с публикации.
    Поделитесь пожалуйста.
    Ответ написан
  • Как обращаться к api.telegram.org?

    @johannes_hirshfeld
    Здравствуйте!

    как добавить в этот код работу через socks5?
    спасибо
    <?php
    
    /**
     * Observium
     *
     *   This file is part of Observium.
     *
     * @package    observium
     * @subpackage alerting
     * @copyright  (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
     *
     */
    
    $message['text'] = simple_template($endpoint['contact_method'] . '_text', $message_tags, array('is_file' => TRUE));
    
    $url = 'https://api.telegram.org/bot' . $endpoint['bot_hash'] . '/sendMessage';
    
    // POST Data
    $postdata = http_build_query(
      array(
        "chat_id"                  => $endpoint['recipient'],
        "disable_web_page_preview" => 'true',                 // Disables link previews for links in message
        "text"                     => $message['text'])
    );
    
    $context_data = array(
      'method'  => 'POST',
      'content' => $postdata
    );
    
    // Send out API call and parse response into an associative array
    $response = get_http_request($url, $context_data);
    
    $notify_status['success'] = FALSE;
    if ($response !== FALSE)
    {
      $response = json_decode($response, TRUE);
      //var_dump($response);
      if (isset($response['ok']) && $response['ok'] == TRUE) { $notify_status['success'] = TRUE; }
    }
    
    unset($url, $send, $message, $response, $postdata, $context_data);
    
    // EOF
    Ответ написан
    Комментировать
  • Как сделать редирект POST запросов с заменой параметров?

    @johannes_hirshfeld Автор вопроса
    Пока ждал смастерил вот что :)
    <?php
    
    
    $login=$_POST['user'];
    $psw=$_POST['pass'];
    $phones=$_POST['target'];
    $mes=$_POST['message'];
    $sender=$_POST['sender'];
    
    
    print file_get_contents('http://s1.example.com/sys/send.php?charset=utf-8&login=' . $login . '&psw=' . $psw . '&phones=' . $phones . '&mes=' . $mes . '&sender=' . $sender . '"');
    
    
    ?>


    работает на ура :)
    спасибо
    Ответ написан
    Комментировать