My index.html page does not show with the site root
http://www.gmanon.com/. A blanc page is being uploaded by the browser.
To access the index or any other page I need to type the full path.
The only strange thing I was able to find in the site were these two
files at the bottom called http.class and http.php. Also I noticed that
my public_html folder had 777 permissions. I don't know how this happeded.
I tryed redirection, and it didn't worked. It gave me an error.
#HTTP.CLASS FILE
<?php
class http {
var $proxy_host = "";
var $proxy_port = 0;
function http_fopen($host, $path, $port = 80) {
# has the user set $proxy_host?
if(empty($this->proxy_host)) {
# we access the server directly
$conn_host = $host;
$conn_port = $port;
} else {
# we use the proxy
$conn_host = $this->proxy_host;
$conn_port = $this->proxy_port;
}
# build the absolute URL
$abs_url = "http://$host:$port$path";
# now we build our query
$query = "GET $abs_url HTTP/1.0\r\n".
"Host: $host:$port\r\n".
"User-agent: PHP/class http 0.1\r\n".
"\r\n";
# open a connection to the server
$fp = fsockopen($conn_host, $conn_port);
# if the connection failed, return false
if(!$fp)
return false;
# send our query
fputs($fp, $query);
# discard the HTTP header
while(trim(fgets($fp, 1024)) != "");
# return the active file pointer
return $fp;
}
}
?>
#HTTP.PHP
*<?php
include "http.class";
$http = new http;
$fp = $http->http_fopen("http://www.gmanon.com", "/");
if(!$fp) {
print "Sorry, the server is not currently available";
exit;
}
print "<BASE HREF=\"http://www.gmanon.com\"><p>";
fpassthru($fp);
?>
This file opens the site with a slash argument instead of r, a or w.
Thanks for any help.
gmanon*