https://xxxx.com/line_echo_bot/push.php
<?php
$raw = file_get_contents('php://input');
$receive = json_decode($raw, true);
$accessToken = "xxxxxxxx" ;
$event = $receive['events'][0];
$reply_token = $event['replyToken'];
$user_id = $event['source']['userId'] ;
$headers = array('Content-Type: application/json',
'Authorization: Bearer ' . $accessToken);
$msg = "これはPUSH配信のテストです";
$message = array('type' => 'text',
'text' => $msg );
$body = json_encode(array('replyToken' => $reply_token,
'messages' => array($message)));
$options = array(CURLOPT_URL => 'https://api.line.me/v2/bot/message/reply',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_POSTFIELDS => $body);
$curl = curl_init();
curl_setopt_array($curl, $options);
curl_exec($curl);
curl_close($curl);
?>