Habs mal ein bisschen verändert:
Leider klappt es nicht und er sagt immer das ich nicht eingelogt bin.
Hir mal die Ausgabe:
Leider klappt es nicht und er sagt immer das ich nicht eingelogt bin.
PHP:
<?php
ini_set(upload_max_filesize, 50);
require("httpconnection.class.php");
$http=new httpconnection("www.fs-location.de");
//if(empty($_COOKIE['PHPSESSID'])) {
$data = $http->post("/community/login/login.php","nickname=KarateHamster&password=******&setCookie=1","","","","","");
setcookie("SESSID", $data['head']['cookies']['0']['value'], time()+40);
setcookie("pc_id", $data['head']['cookies']['1']['value'], time()+40);
$SESSID = $data['head']['cookies']['0']['value'];
$pc_id = $data['head']['cookies']['1']['value'];
$nickname = $data['head']['cookies']['2']['value'];
$temp_pw = $data['head']['cookies']['3']['value'];
//}
echo nl2br(print_r($data['head'],true));
echo $data['body'];
echo "<br><br>Teil 2:<br>";
$send = $http->post("/community/pm/save_new.php","PHPSESSID=$SESSID&pc_id=$pc_id&nickname=$nickname&temp_pw=$temp_pw","resc=KarateHamster&title=Hallo&text=Ichbins","","","","");
echo nl2br(print_r($send['head'],true));
echo "<br>".$send['body'];
?>
Hir mal die Ausgabe:
Code:
Array
(
[raw] => HTTP/1.1 302 Found
Date: Tue, 13 Mar 2007 19:17:57 GMT
Server: Apache
Set-Cookie: PHPSESSID=6tuv8hgvpt6n35dchhlchsg5p3; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: pc_id=1405435; expires=Fri, 10-Mar-2017 19:17:57 GMT; path=/
Set-Cookie: nickname=KarateHamster; expires=Wed, 12-Mar-2008 19:17:58 GMT; path=/
Set-Cookie: temp_pw=8b761b299197e581ac10c2a09f2c1c96; expires=Wed, 12-Mar-2008 19:17:58 GMT; path=/
Location:
Vary: Accept-Encoding
Content-Length: 0
Connection: close
Content-Type: text/html
[httpversion] => 1.1
[server] => Apache
[contentlength] => 0
[contenttype] => text/html
[location] => Array
(
[uri] =>
)
[cookies] => Array
(
[0] => Array
(
[name] => PHPSESSID
[value] => 6tuv8hgvpt6n35dchhlchsg5p3
[path] => /
)
[1] => Array
(
[name] => pc_id
[value] => 1405435
[path] => /
[expirydate] => Array
(
[string] => Fri, 10-Mar-2017 19:17:57 GMT
[timestamp] => 1489173477
)
)
[2] => Array
(
[name] => nickname
[value] => KarateHamster
[path] => /
[expirydate] => Array
(
[string] => Wed, 12-Mar-2008 19:17:58 GMT
[timestamp] => 1205349478
)
)
[3] => Array
(
[name] => temp_pw
[value] => 8b761b299197e581ac10c2a09f2c1c96
[path] => /
[expirydate] => Array
(
[string] => Wed, 12-Mar-2008 19:17:58 GMT
[timestamp] => 1205349478
)
)
)
)
Teil 2:
Array
(
[raw] => HTTP/1.1 302 Found
Date: Tue, 13 Mar 2007 19:17:59 GMT
Server: Apache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: /home/error.php?id=authentication_failed
Vary: Accept-Encoding
Content-Length: 111
Content-Type: text/html
[httpversion] => 1.1
[server] => Apache
[contentlength] => 111
[contenttype] => text/html
[location] => Array
(
[uri] => /home/error.php
[parameters] => id=authentication_failed
)
)
6tuv8hgvpt6n35dchhlchsg5p3
Leite weiter zu /home/error.php?id=authentication_failed