我正在尝试确定我的登录是否成功。所以我用我的凭据登录并点击提交 当我点击提交时,它所做的只是在帖子字段下方包含其他网站 这是我点击提交之前的截图:http: //gyazo.com/cecea7aff4947b953ce093f4328722b4 这是之后的部分截图我点击提交: http: //gyazo.com/8a03440584c0f9385cb1faef05e11993 我尝试输入正确和不正确的凭据,同样的事情正在发生。我不确定我的登录是否成功。登录后,我打算在会员区发帖。
注意:消息发布字段现在没有被使用,我会用它来做其他事情,但这是我的代码:
<html>
<div>
<form method="POST">
Message: <input name="message" type="text" size="25" /></br>
Username:<input name="username" type="text" size="25" /></br>
password:<input name="password" type="password" size="25" /></br>
<input name="submit" type="submit" value="submit" />
</form>
</div>
</html>
<?php
if(isset($_POST['message'])){$message= $_POST['message'];}
if(isset($_POST['username'])){$username = $_POST['username'];}
if(isset($_POST['password'])){$password = $_POST['password'];}
if(isset($_POST['submit'])){
$link = "http://site.com/index.php?section=login;
$datatopost = array (
"auth_key" => "880ea6a14ea49e853634fbdc5015a024",
"referer" => "http://google.com",
"ips_username" => $_POST['username'],
"ips_password" => $_POST['password'],
);
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $link);
curl_setopt ($ch, CURLOPT_POST, true);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $datatopost);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$returndata = curl_exec($ch);
echo $returndata;
curl_close($ch);
};
?>