Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- //$key=$_SERVER['PHP_SELF'];
- if(isset($_GET['key'])){
- $key=htmlspecialchars($_SERVER['PHP_SELF']);
- $con = mysql_connect('127.0.0.1','root','') or die ('error');
- if(!($con))
- echo ("Server Not connect");
- $db = mysql_select_db("new", $con)or die ('error');
- if(!($db))
- echo ("Database Not Select");
- @$select= mysql_fetch_assoc(mysql_query("SELECT * FROM short WHERE url = '$key' "));
- if ($select){
- $result=[
- 'url'=>$select['url'],
- 'key'=>$select['short_key']
- ];
- //echo $key;
- header('location:'.$select['url']);
- }}
- else{}
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement