我的代码:Wialon远程API登录
<?php
if(isset($_GET['login']) && isset($_GET['login']) && isset($_GET['password'])){
$_login_url = "http://testing.wialon.com/wialon/ajax.html?svc=core/login¶ms={user:%s,password:%s}";
$login = $_GET['login'];
$password = $_GET['password'];
$handle = fopen(sprintf($_login_url, $login, $password), "r");
$line = fgets($handle);
fclose($handle);
$responce = explode(",",$line);
if(count($responce) < 2) {
echo "Invalid user or password";
} else {
$sessid = explode(":",$responce[1]);
$lastid = str_replace("\"","",$sessid[1]);
echo "http://testing.wialon.com/index.html?sid=".$lastid."";
}
}
?>
,当我访问此脚本宿主脚本一切完美,这些会议与我的IP地址生成的服务器。
但是,当我用另一台计算机访问它时,任何试图登录脚本的用户都会使用服务器IP地址生成会话。我可以使用用户IP地址发送请求吗?