Skip to content

Instantly share code, notes, and snippets.

@ammarfaizi2
Created May 22, 2018 13:50
Show Gist options
  • Save ammarfaizi2/288b2e5445654eca00473a39f2035769 to your computer and use it in GitHub Desktop.
Save ammarfaizi2/288b2e5445654eca00473a39f2035769 to your computer and use it in GitHub Desktop.
<?php
if (isset($_GET['q'])){
header("Content-type:application/json");
$cont = array(
"content" => array(
"title" => '06v½ [480p & 720p]'
)
);
echo json_encode($cont);
}
?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$.ajax({
url: "?q",
type: "GET",
data:{"q": "y"},
success: function (response){
document.write(response.content.title);
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment