Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 60d142f0a3
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 37 lines (32 sloc) 1.195 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
<?php
require_once 'memegenerator.class.php';

$meme = new MemeGenerator('username','password'); // from http://www.memegenerator.com

if($_GET)
{
$result = ($meme->meme($_GET['top'], $_GET['bottom'], $_GET['q']));
$image = $result['result'];

if($result['success'] == 'true')
{
$output = '<a href="'.$image['instanceUrl'].'"><img src="'.$image['instanceImageUrl'].'"/></a>';
}
else
{
$output = 'No Meme Found called: '.$_GET['q'];
}
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<header>
<title>MemeBro</title>
</header>
<h1>MemeBro</h1>
<h2>Make your Meme with Meme Bro</h2>
<form name="input" action="<?php echo $_SERVER['PHP_SELF'];?>" method="get">
<input type="text" name="top" value="<?php echo $_GET['top']; ?>" placeholder="Top"/><br>
<input type="text" name="bottom" value="<?php echo $_GET['bottom']; ?>" placeholder="Bottom"/><br>
<input type="text" name="q" value="<?php echo $_GET['q']; ?>" placeholder="Meme"/><br>
<input type="submit" value="Submit"/><br>

<?php echo $output ?>
</form>
</html>
Something went wrong with that request. Please try again.