Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host="127.0.0.1";
- $user="user";
- $pass="pass";
- $database="database";
- $table="table";
- $expire="50"; // expire time in seconds
- function check_valid($t)
- {
- if (time-$t > $expire) return 0; else return 1;
- }
- $db=mysql_connect($host, $user, $pass);
- if(!$db)
- die(mysql_error());
- $db=mysql_select_db($database);
- if(!$db)
- die(mysql_error());
- $nh = $_GET['n'];
- if ( $nh )
- {
- echo "$nh<br>";
- $res=mysql_query("SELECT * FROM $table WHERE nfo_rlsname ='$nh'");
- if(mysql_num_rows($res) > 0)
- {
- $row=mysql_fetch_array($res);
- if ( check_valid($row['unixtime']) == 1 ) {
- echo str_replace("\n", "<br>", $row['nfo_data']);
- }
- else {
- echo "Expired..";
- }
- }
- else
- {
- echo "Nothing found";
- }
- }
- else
- {
- echo "No input";
- }
- ?>
Add Comment
Please, Sign In to add comment