PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php define('TOKEN','7768137200:AAHxzY8tnIxVkjHRFesildnx8NIFk5dtyjM'); function jsone($str){return empty($str)? '': json_encode($str,JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);} function call(array $arr){ return file_get_contents( 'https://api.telegram.org/bot'.TOKEN.'/', 0, stream_context_create([ 'http'=>[ 'follow_location'=>false, 'ignore_errors'=>true, 'timeout'=>2, 'header'=>'Content-Type: application/json', 'content'=>jsone($arr) ], 'ssl'=>[ 'verify_peer'=>false, 'verify_peer_name'=>false ] ]) ); return ''; } $S='zxc1'; var_dump(call([ 'method'=>'sendMessage', 'chat_id'=>524481401, 'parse_mode'=>'MarkdownV2', 'text'=>'```json'.PHP_EOL.addcslashes($S,'\\`').PHP_EOL.'```', ]));
Show:  
Copy Clear