Skip to content

Instantly share code, notes, and snippets.

@simonwheatley
Created November 4, 2011 11:42
Show Gist options
  • Save simonwheatley/1339166 to your computer and use it in GitHub Desktop.
Save simonwheatley/1339166 to your computer and use it in GitHub Desktop.
APNS Tests
<!DOCTYPE html>
<html lang='en-us' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta charset='utf-8'>
<title>APNS TESTING 1…2…3…</title>
</head>
<body>
<?php
require_once( 'wp-load.php' );
/**
* Testing stuff.
*
* @return void
**/
function main() {
global $wpdb, $ipp;
$sql = " SELECT * FROM {$wpdb->prefix}apns_tokens ";
$results = $wpdb->get_results( $sql );
echo "<h1>APNS TESTING 1…2…3…</h1>";
foreach ( $results as $result ) {
$result->unpacked_token = $ipp->unpack_token( $result->token );
echo "<div><pre>" . print_r( $result, true ) . "</pre></div>";
}
echo "<hr />";
}
main();
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment