2006-02-08, 02:26 AM
Okey, so I've got this script running on createmybb.com in order to use the MyBB function postify().
First it reads news.php in the forums directory. In news.php it fetches the threads from a specificed forum and postify()'s them in order to allow MyCode and such, then it is echo'ed to the site: www.createmybb.com.
Now theirs no errors, but You will see something like: "HTTP/1.1 200 OK Date: Wed, 08 Feb 2006 02:24:29 GMT Server: Apache X-Powered-By: PHP/4.4.1 Set-Cookie: mybb[lastvisit]=1139365469; expires=Thu, 08 Feb 2007 02:24:29 GMT; path=/ Set-Cookie: mybb[lastactive]=1139365469; expires=Thu, 08 Feb 2007 02:24:29 GMT; path=/ Set-Cookie: sid=*******************; path=/ Connection: close Content-Type: text/html"
which is the result of headers. How can I remove that?
<?php
$fp = @fsockopen("www.createmybb.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "News is unavailable at this time. Refreshing may fix the problem<br />";
//echo "$errstr ($errno)<br />\n";
} else {
$out = "GET /support/news.php HTTP/1.0\r\n";
$out .= "Host: www.createmybb.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
First it reads news.php in the forums directory. In news.php it fetches the threads from a specificed forum and postify()'s them in order to allow MyCode and such, then it is echo'ed to the site: www.createmybb.com.
Now theirs no errors, but You will see something like: "HTTP/1.1 200 OK Date: Wed, 08 Feb 2006 02:24:29 GMT Server: Apache X-Powered-By: PHP/4.4.1 Set-Cookie: mybb[lastvisit]=1139365469; expires=Thu, 08 Feb 2007 02:24:29 GMT; path=/ Set-Cookie: mybb[lastactive]=1139365469; expires=Thu, 08 Feb 2007 02:24:29 GMT; path=/ Set-Cookie: sid=*******************; path=/ Connection: close Content-Type: text/html"
which is the result of headers. How can I remove that?