Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 8 lines (8 sloc) 369 Bytes
<?php
header('Content-type: application/json');
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
echo json_encode(array_merge($_POST, array('tweet_author' => 'JeffreyATW', 'tweet_avatar' => 'avatar.jpg')));
} else {
echo json_encode(array('tweet_content' => 'This is a canned tweet', 'tweet_author' => 'RandomDude', 'tweet_avatar' => 'randomdude.jpg'));
}
?>
You can’t perform that action at this time.