Outgoing port 8080 open?

Reposting - sales said I could do this, but a reply from “Neo ns101.com” to a previous email said this could not be done!

I need to write php code (fopen or curl - both are same!) to retrieve this file:
[To Neo: note that it is not just a plain URL, it contains :8080 at end. So, either curl or fopen test is fine, as long as that port is used.]

Can someone with Level 1 package test this with PHP?
That URL above is actual PHP code, if you can save that as u.php on your server, and see what it shows when you load that u.php page, and let me know!

I am looking for a new host - one that will support PHP code that contains socket opens (to talk to other web servers), at non-standard ports such as 8080.

Example: - when viewed from a browser, should have first line saying "Success!"
The php code for that can be seen at:

Can someone who has the “Level 1” program at DreamHost (with non-unique IP address) tell me if that PHP code will work on their site?

I would really appreciate it if you can copy over the u.txt file to a u.php file on your server, and then go to web browser to visit that page, and tell me if it says “Success” or "Could not contact…"
Or, if you know for sure whether outgoing ports are open for DreamHost servers. Note that I’m not asking about incoming ports - I know that only port 80 may be kept open for incoming requests, other ports may all be closed.

This tests whether the PHP code can eventually do things like: fopen(“http://${remotehost}:${remoteport}/test.txt”)
which reads a file from a remote web server, at remoteport.

I have done as you asked, I believe.

The page loaded a success, and I was able to click the button, and got an other success page. I’m hosted on a regular shared hosting plan at dreamhost. The only differnece between the shared hosting plans is the amount of storage and whatnot - there is no differnece in waht you cand do with them. That being said I’m acutally a level three hosting plan.

If you’re going to sign up for Dreamhost, you could follow my Referal link. That will give me credit for your sign up - an other great thing that Dreamhost does.

Oh, and one more thing. Fopen is disabeled on Dreamhost servers, but curl works just fine.


like the above poster said, fopen is disabled on dreamhost because of security, i have a quote from the DreamHost System Announcements:

PHP’s allow_url_fopen NOW Disabled (Action Required)

Posted: Apr 20th, 2005 - 03:43:34 PM PST (4 mons 28 days ago)

As previously announced on March 18, 2005, the allow_url_fopen PHP configuration has now
been turned off on all servers.

If you are currently using this functionality in your PHP code, there is a more powerful and
flexible option available. PHP provides excellent support for curl library and its associated

One of our own users has written a short article describing how it is used and that can be found

The official PHP documentation for it is here:

This change will significantly improve the security of PHP-based applications running on our
servers so we can spend more time giving you more features!

Happy DreamHost PHP Security Team
so, as you can see fopen(); using any URL has been turned off, you can not use fopen to include data from a remote server, nor form a local server, (by specifying a http://url.com/to/file.ext) on any port. the use of cURL is required for PHP to get any data from a remote site, if sales told you it was still possible to do such a thing by using fopen(); then they either misunderstood you, or they were misinformed. i posted code in my last post regardign this that does work, that is a working example of a script i use to pull data from the web server and IRCd server, i run at home, if you need it to access a diffrent port then just add it to the IP or URL it works the same, i have one of these running that pulls data off a server running at 10001 ( to many servers on one network i tell ya).

also to edit, no i have connected from Dreamhost using SSH, to hosts on loads of ports ranging from 21 all the way to 10001 using links to browse the web from my shell account… i dont have access to a linux box since mine went BANG when the motherboard fired and i miss the good ol’ links… lol so no as far as i know you can create a connection from any port, but you must use cURL.

also another edit, you can post to a remote forum, no matter if fopen works or not… i can submit a forum on dreamhost, to the Apache 2 setup i have running on this system and i get all of the data… Also in your code you are not using fopen(); to do anything, your opening a socket this is a much diffrent thing… opening a socket and reading/writing data is not disabled by DH, but the acctual remote URL functions in fopen(); function is, so no you will never be able to:
This tests whether the PHP code can eventually do things like: fopen(“http://${remotehost}:${remoteport}/test.txt”)
which reads a file from a remote web server, at remoteport.
as remote fopen(); has been disabled, if you can write the sockets to move the data then that will work, if you can use cURL to do the same thing with less work thats fine, but fopen will not open a remote page