Skip to content

Instantly share code, notes, and snippets.

@jkishner
Created August 13, 2012 21:45
Show Gist options
  • Save jkishner/3344306 to your computer and use it in GitHub Desktop.
Save jkishner/3344306 to your computer and use it in GitHub Desktop.
<?php
$prompt = $_POST['prompt'];
$site = $_POST['site'];
if ( $site == google )
{
header('Location: http://google.com/search?q=' . $prompt . '');
}
elseif
( $site == appstore )
{
header('Location: http://phobos.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=' . $prompt . '');
}
elseif
( $site == wikipedia )
{
header('Location: http://en.wikipedia.org/wiki/' . $prompt . '');
}
elseif
( $site == yelp )
{
header('Location: yelp4:///search?terms=' . $prompt . '');
}
elseif
( $site == imdb )
{
header('Location: imdb:///find?q=' . $prompt . '');
}
elseif
( $site == phone )
{
header('Location: tel:' . $prompt . '');
}
elseif
( $site == omnifocus )
{
header('Location: omnifocus:///add?name=' . $prompt . '');
}
elseif
( $site == twitter )
{
header('Location: twitter://post?message=' . $prompt . '');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment