Jump to content

Header Information!


john_bboy7

Recommended Posts

 

 

==================

Warning: Cannot modify header information - headers already sent by (output started at /www/110mb.com/asksjdjsa/htdocs/Testing.php:4) in /www/110mb.com/asksjdjsa/htdocs/Testing.php on line 6

==================

 

PLease can any one tell me why i am getting this error???  ??? ??? ???

 

Its something like i am getting a cookie and saving it so i can use it further....

 

Here is my Code:

 

<?php
header("Content-Type: text/html; charset=UTF-8"); // maybe I need to change the charset
require('class.XMLHttpRequest.php');

$req = new XMLHttpRequest();
$req->open("GET","https://www.google.com/accounts/ClientLogin?Email=Mymailhere&Passwd=pass&service=orkut&skipvpage=true&sendvemail=false");
$req->send(null);

preg_match("/auth=(.*?)\n/i", $req->responseText, $auth);

$req->open("GET","http://www.orkut.com/RedirLogin.aspx?auth=".$auth[1]);
$req->send(null);

preg_match("/orkut_state=[^;]*/i", $req->getResponseHeader('Set-Cookie'), $orkut_state);

$req->open("GET","http://www.orkut.com/Community.aspx?cmm=43558952");
$req->setRequestHeader("Cookie",$orkut_state[0]);
$req->send(null);

echo $req->responseText;
?>

 

If any one knows the error please tell me...

Link to comment
https://forums.phpfreaks.com/topic/102827-header-information/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.