Last active
January 21, 2016 00:57
-
-
Save maagmirror/92ffeb7f46305ac3d3fa 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
<html> | |
<title>bot</title> | |
<body background="/background.jpg"> | |
<body> | |
<TABLE WIDTH="100%" HEIGHT="100%"> | |
<TR> | |
<TD VALIGN="MIDDLE" ALIGN="CENTER"> | |
<font size=10 color="white"> | |
<?php | |
$url = 'http://www.taringa.net/ajax/mentions/user'; | |
$fields = array( | |
'uid' => '25854531' //Id del usuario | |
); | |
$fields_string=""; | |
foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } | |
rtrim($fields_string, '&'); | |
$ch = curl_init(); | |
curl_setopt($ch,CURLOPT_URL, $url); | |
curl_setopt($ch,CURLOPT_POST, count($fields)); | |
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
$result = curl_exec($ch); | |
curl_close($ch); | |
$data = json_decode($result,true); | |
$status = $data['data']['userStatus']; | |
if($status == 'offline') { | |
echo '<div style="color:red">offline<div>' ; | |
} | |
else { | |
echo '<div style="color:green">online<div>' ; | |
} | |
?> | |
</TD> | |
</TR> | |
</TABLE> | |
</BODY> | |
</font> | |
</html> |
santiq
commented
Jan 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment