Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $trailers = array('message' => array('message_id' => '0',
- 'chat' => array('id' => 'agaponiz'),
- 'text' => '/trailers',
- 'link' => 'www.kinopoisk.ru')
- );
- /*
- print_r($trailers);
- $jsonTrailers = json_encode($trailers);
- print_r($jsonTrailers);
- */
- $url = 'https://goslingbot.herokuapp.com/robot.php';
- $handle = curl_init($url);
- curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($handle, CURLOPT_CONNECTTIMEOUT, 5);
- curl_setopt($handle, CURLOPT_TIMEOUT, 60);
- curl_setopt($handle, CURLOPT_POSTFIELDS, json_encode($trailers));
- curl_setopt($handle, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
- curl_exec($handle);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement