GetDotted Domains

Viewing Thread:
"Restrictions with PHP on Freeola"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Thu 24/04/03 at 22:49
Regular
Posts: 787
I've just been writing a small Script, to test a few things out, and part of it uses fsockopen(); to open up a connection with a Web Site. The thing I have found is that if I try and connect to any of my sites on Freeola, the returning value is always a 404, even when I know a particular page is on the server, as I have it open in front of me when I test.

Other Web Sites open up and connect without any problems, giving back the expected 200 OK message, yet Freeola hostes sites send back a 404 Error message for every Page under my Domains.

Is this a restriction on Freeola accouts, whereby other sites can't connect to them via the PHP fsockopen(); function???
Fri 25/04/03 at 17:39
Regular
"It goes so quickly"
Posts: 4,083
Oh, I saw a mistake, your code had the / within the code, whereas I had it within the $Page string, hence two // :)

Got rid of one, added the Host: back again, and it seems to be working :)

*fingers Crossed*

Thanks for your help.
Fri 25/04/03 at 17:31
Regular
"It goes so quickly"
Posts: 4,083
I get the same result if I leave Host out, but if I put it in, I get 'Bad Request'.

Strange.
Fri 25/04/03 at 16:28
Regular
"Devil in disguise"
Posts: 3,151
Strange, the only code I used is...

$Host = "www.abcsoftware2000.co.uk";
$Page = "index.htm";

@ $fp = fsockopen("$Host", 80, &$ErrorNo, &$ErrorDesc, 10)
or
die("

Connection to $Host$Page failed.

\n\n\n");
print "Trying $Host
";
print "Trying to get $Page
\n";
fputs($fp, "HEAD /$Page HTTP/1.0\nHost:www.abcsoftware2000.co.uk\n\n");
print fgets($fp, 1024);
fclose($fp);

Just picked a freeola hosted site at random there from freeola's customer sites list. And running that gives me...

Trying www.abcsoftware2000.co.uk
Trying to get index.htm
HTTP/1.1 200 OK

if leave out the host field I get

Trying www.abcsoftware2000.co.uk
Trying to get index.htm
HTTP/1.1 404 Not Found
Fri 25/04/03 at 15:31
Regular
"It goes so quickly"
Posts: 4,083
Garin wrote:
> HEAD /index.php HTTP/1.0\nHost:www.haignet.co.uk\n\n

I get the result of a 'Bad Request' with this one.

Trying without the http:// in the address, I still get the the 404 Error message.


Rob, I don't know jack about Proxy stuff :) Even though I probably should. What do you mean by a public proxy??

All I know is other Web Sites I tried to conenct to, even these Chat Forums, bring up a '200 OK' message, where as any Freeola hosted site still are not found.
Fri 25/04/03 at 12:58
Regular
"Devil in disguise"
Posts: 3,151
Just looking at your sample code, your page request is missing some info....
You should really have

HEAD /index.php HTTP/1.0\nHost:www.haignet.co.uk\n\n

Forgotten why you need the host tag, same vague memory out it being because of servers hosting several domains or something like that.

Also, not really sure if fsockopen will like you passing http://www.haignet.co.uk as opposed to www.haignet.co.uk

Just had a quick copy/paste of your code with those changes, certainly works for me on www.haignet.co.uk.
Fri 25/04/03 at 11:40
Regular
"Eff, you see, kay?"
Posts: 14,156
Ah well in which case it's very probable it won't connect to Freeola pages properly. You'll have to wait for a Freeola tech type person to reply and give you full details though. In the mean time you could try find a public proxy (I might know a few) and use some proxy skillz. If you use a proxy it will open Freeola pages okay.
Fri 25/04/03 at 09:17
Regular
"It goes so quickly"
Posts: 4,083
For when someone fills in a form, and enters a Web Address, the Script tries opening a connection to the page and returns a nummber, representing the connections status (404 - no page, 200 OK - it does exist) etc. Its just to make sure the Web Address someone enters does exist:

Here is the sample code:

$Host = "http://www.haignet.co.uk/";
$Page = "index.php";

@ $fp = fsockopen("$Host", 80, &$ErrorNo, &$ErrorDesc, 10)
or
die("

Connection to $Host$Page failed.

\n\n\n");
print "Trying $Host
";
print "Trying to get $Page
\n";
fputs($fp, "HEAD $Page HTTP/1.0\r\n\r\n");
print fgets($fp, 1024);
fclose($fp);
Fri 25/04/03 at 01:26
Regular
"Eff, you see, kay?"
Posts: 14,156
This could be a routing issue and it probably unsolvable - not a restriction as such, just.. something that happens. What are you trying to do?
Thu 24/04/03 at 22:49
Regular
"It goes so quickly"
Posts: 4,083
I've just been writing a small Script, to test a few things out, and part of it uses fsockopen(); to open up a connection with a Web Site. The thing I have found is that if I try and connect to any of my sites on Freeola, the returning value is always a 404, even when I know a particular page is on the server, as I have it open in front of me when I test.

Other Web Sites open up and connect without any problems, giving back the expected 200 OK message, yet Freeola hostes sites send back a 404 Error message for every Page under my Domains.

Is this a restriction on Freeola accouts, whereby other sites can't connect to them via the PHP fsockopen(); function???

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Unrivalled services
Freeola has to be one of, if not the best, ISP around as the services they offer seem unrivalled.
Second to none...
So far the services you provide are second to none. Keep up the good work.
Andy

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.