Skip to content

Instantly share code, notes, and snippets.

View juntao's full-sized avatar

Michael Yuan juntao

View GitHub Profile
<?php
if ($_REQUEST["user_name"] == "slackbot") {
exit;
}
$cache_file = $_REQUEST["token"] . '.txt';
if (!file_exists($cache_file)) {
// This is a new conversation. Start with search
$json_str = file_get_contents("http://www.omdbapi.com/?s=" . urlencode($_REQUEST["text"]) . "&r=json");
<?php
$json_str = file_get_contents("http://www.omdbapi.com/?t=" . urlencode($_REQUEST["text"]) . "&y=&plot=short&r=json");
$json = json_decode($json_str, true);
echo "'" . $json['Title'] . "' " . $json['Year'] . ". Rating:" . $json['imdbRating'] . " IMDB: http://www.imdb.com/title/" . $json['imdbID'] . "/ Plot: " . $json['Plot'];
?>

This is a test

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.