Skip to content

Commit 8bcdfb0

Browse files
author
jlengstorf
committed
Fixed syntax error and did a much smarter job of displaying debugging data.
1 parent 4e1ffe4 commit 8bcdfb0

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

index.php

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
22

3+
// Turns error reporting up to eleven
4+
error_reporting(E_ALL^E_STRICT);
5+
ini_set('display_errors', 1);
6+
37
// Catches the Instagram realtime Pubsubhubub challenge flow
48
if (isset($_GET['hub_challenge'])) {
59
echo $_GET['hub_challenge'];
@@ -8,12 +12,17 @@
812

913
if ($_SERVER['REQUEST_METHOD']==='POST') {
1014
// Instantiates Pusher PHP API
11-
// require 'lib/Pusher.php';
12-
13-
// $pusher = new Pusher('867d60a8d5de3996dd25', '7709ac1336e7968d1a61', '42771');
14-
// $pusher->trigger('selfies', 'new-selfie', array('selfie' => 'New selfie!'))
15-
16-
mail('[email protected]', 'Realtime POST', print_r($_POST, TRUE));
15+
require 'lib/Pusher.php';
16+
17+
$pusher = new Pusher('867d60a8d5de3996dd25', '7709ac1336e7968d1a61', '42771');
18+
$pusher->trigger(
19+
'selfies',
20+
'new-selfie',
21+
array(
22+
'selfie' => 'New selfie!',
23+
'debug' => print_r($_POST, TRUE)
24+
)
25+
);
1726
}
1827

1928
?>

0 commit comments

Comments
 (0)