Another question from me...
is it possible to send so info via the post method with php and get the result url?
I've been using curl:
Code:
function post_data($postd,$url,$follow) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$postd);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,$follow);
$postResult = curl_exec($ch);
if (curl_errno($ch)) {
return false;
}
curl_close($ch);
return $postResult;
}
and:
$postd = array(
"Username" => $_POST['user'],
"Password" => $_POST['pass']
);
echo post_data($postd,"http://www.someurl.com/login.php",0);
but the result is nothing,
the page is blank.
What i am trying to get is the url of the resulting page,
Eg.
Success:
http://www.someurl.com/usercp/
Fail:
http://www.someurl.com/index.php?errorcode=1
If anyone could help me out with the code i posted or get me some different code then that'd be great!