Created
December 4, 2017 15:05
-
-
Save fataelislami/4e4057efa77b31b8db9114f948baa822 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-Type: image/jpeg"); | |
$curl = curl_init(); | |
$id=$_GET['id']; //Id Message | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => "https://api.line.me/v2/bot/message/".$id."/content", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => "", | |
CURLOPT_MAXREDIRS => 10, | |
CURLOPT_TIMEOUT => 30, | |
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, | |
CURLOPT_CUSTOMREQUEST => "GET", | |
CURLOPT_HTTPHEADER => array( | |
"authorization: Bearer <Access Token Secret Disini>, | |
"cache-control: no-cache", | |
"postman-token: 32229dfc-7a5f-b01e-ccaa-482d2209e337" | |
), | |
)); | |
$response = curl_exec($curl); | |
$err = curl_error($curl); | |
curl_close($curl); | |
if ($err) { | |
echo "cURL Error #:" . $err; | |
} else { | |
echo $response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment