OpenloadTicket
// Add Shortcode
function openload_ticket( $atts ) {
// Attributes
$atts = shortcode_atts(
array(
),
$atts,
'id'
);
$apiLogin = API_LOGIN;
$apiKey = API_KEY;
$url = "https://api.openload.co/1/file/dlticket?file={$id}&login={$apiLogin}&key={$apiKey}";
$response = wp_remote_get( esc_url_raw( $url ) );
/* Will result in $api_response being an array of data,
parsed from the JSON response of the API listed above */
$api_response = json_decode( wp_remote_retrieve_body( $response ), true );
return $api_response
}
add_shortcode( 'openload-ticket', 'openload_ticket' );