<?php
$id = intval($_GET['id']);
$host='localhost';
$username='url';
$password='pass';
$dbname='url';
$link = @mysqli_connect($host, $username, $password, $dbname);
if($link){
$sql = "SELECT siteurl FROM len_url WHERE id='$id'"; // SQL 语句
$result = mysqli_query($link, $sql); // 执行 SQL 语句,并返回结果
$data = mysqli_fetch_all($result); // 从结果集中获取所有数据
mysqli_close($link);
}else{
echo '数据库连接失败!';
}
$url=$data['0'][0] ;
if(empty($url)){
header("Location:https://len.im/echo.htm");
}else{
header("Location:$url");}
?>
本文链接:
https://len.im/238.htm