Created
March 5, 2010 02:37
-
-
Save navarr/322399 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("../inc.files/inc.php"); // Contains simpleTAPI settings and user cache creation | |
$id = $_REQUEST["id"]; | |
if(substr($id,0,2) == "0x") { $id = hexdec(substr($id,2)); } | |
elseif(str_ireplace(array("a","b","c","d","e","f"),"",$id) != $id) { $id = hexdec($id); } | |
$r = $t->api->statuses_show($id); | |
if($r["TAPI"]["response_code"] == 403 && !$t->uid) | |
{ | |
print("Try <a href=\"/login.php\">Logging In</a>");die(); // Login.php simply contains the include and $t->require_login($http_referer_or_null); | |
} | |
if(!isset($r["result"]["id"])) { header("Content-type:text/plain");print("ID: $id\n\n");print_r($r);die(); } | |
$url = "http://twitter.com/{$r["result"]["user"]["screen_name"]}/status/{$r["result"]["id"]}"; | |
header("Location: {$url}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment