Allow URL fopen

Good day :slight_smile:

Ok, I tried to use a php include on my site ( but as you can see it gave me error messages, looked it up and found out it’s because Dreamhost have this option turned off etc:

Well, is there any way around it? The page above only seems to give a solution for if the file is on your own server…but the thing I am trying to include is not on my server.


I’ve had success with this within a php script:

$ch = curl_init();
curl_setopt($ch, curlOPT_URL, “”);
curl_setopt($ch, curlOPT_HEADER, 0);


In the very first paragraph of the page you refer to:

“[color=#00CC00]a feature-rich alternative exists in the form of the bundled cURL library[/color]”

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

That’s only handy if you already know what cURL can do. Those looking to get url_fopen to work will read the page looking for working examples. I seldom click on every link in a Wiki article to find a solution.

At least now I can just include the Wiki cURL link when I reply to messages like his.


“however, a feature-rich alternative exists in the form of the bundled cURL library, and you can always get around the problem by compiling your own version of PHP.”

That whole sentence was like a foreign language to me when I originally read it, since I didn’t really have a clue what was going on…what Allow URL fopen was…never head of cURL etc

Thanks for your help scjessey and…I got it worked out :slight_smile:

You could compile your own copy of php and setup whatever you need in the php.ini Here’s a wiki:

I’m trying this, but it seems to be retrieving… nothing.

I’ve tried it as part of a local php file, called by an shtml file. No go. So now I have it inside the shtml file itself. The page itself (which has other content) runs fine, but where the results of the cURL should be is blank.

This whole thread demonstrates what happens when people who aren’t web designers try to build websites. I cannot remember who said this, but it definitely holds true:

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

Actually, I think the purpose of this and other threads is for people with knowledge to help others when they can, trusting that when they themselves have questions, others will offer similar help to them.

As to your comment, I’m quite new to cURL - never heard of it before signing up with Dreamhost - but on my previous host, got PHP set up all by myself to make it do what I need it to. And I spent several hours reading the info on cURL here and elsewhere, trying various proposed remedies. It’s only because they haven’t worked for me that I posted here. And I didn’t even make a new thread, since I found this one on the same topic. Seems to me I’m following normal procedure and etiquette, and did not deserve the implied criticism in your post.


While I can’t speak for Simon, I think he might have just been discouraged…from your proceeding post, it is really hard to know “where to start” to try to help you…

“No go” doesn’t tell us much that is useful. You didn’t include any code fragments, so we don’t know what the “it” is that you tried, and provided no description of output or error messages - We might want to help, but how can we respond to that?

So now I have it inside the shtml file itself. The page itself (which has other content) runs fine, but where the results of the cURL should be is blank.[/quote]
This is a little better, as you indicate you have output on the page but are not displaying output form the “cURL code”, but again you have not described the “it” that you have included, or indicated how you “have” it “inside” the .shtml code - we can’t guess the particulars of what you are trying to do, and can’t see what you have done in attempting to accomplish it.

Without those things, the only thing your post in this thread seems to have in common with the original poster’s, is that…well, what exactly? Your script is “gagging” on the inability to use Allow Url Fopen? You are also trying to implement “cURL” to fetch the contents of an external webpage?

I have a couple of friendly suggestions. First, don’t take Simon’s post so personally; while it was posted in response to your post, he clearly said “this whole thread”, and I interpreted it to refer to the general circumstance of web “developers” attempting to “casually” adopt/use technologies with which they are not familiar and that they don’t understand.

Secondly, you might want to review the classic internet resource on how to ask questions the smart way. This suggestion is not intended to belittle or ridicule you in any way (I review that page periodically myself, because it is so useful).

Finally, once you have a “good question” (in the sense of the above reference), start a new thread that deals with the particulars of your circumstance, rather than “hijacking” an existing thread than might seem similar, but might be sufficiently different in circumstances to yours that dealing with your issue in that thread could confuse the original poster, those trying to help, or other readers looking for help.

Please understand that none of what I have written is intended to be unkind; I’d like to see your problem get some attention, and that is my sole purpose in responding to your post. :slight_smile:


My post was certainly not a criticism of you specifically. I intended to draw attention to the growing problem of “do-it-yourselfers” trying to make use of techniques and technologies beyond their understanding. People don’t realize that web design is hard, and they get frustrated when things aren’t as easy as A.B.C.

As far as your specific problem is concerned, perhaps it is the use of .shtml getting in the way. Is it not possible to create a regular PHP page? Can you let us seem some code?

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

Programmer-types are generally notorious for being unsociable, tactless individuals. rlparker is an exception to this rule, but sadly I am not. His post hits the nail right on the head.

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

Ha ha… Thanks, Simon! God knows I’ve been accused plenty of times of being “abrupt” or “harsh” in these forums, and, like all humans, I have some days when I am “gentler” than I am on other days. I think the “tough love” days come, on occasion, as a result of spending more time in front of a screen than in bed (and you can take in either of the obvious contexts) :wink:


Thanks - I stand corrected, and appreciate your explanations. As suggested, I’ll create a new thread.

My old friend has returned to his favorite pastime, I see. It’s been a while since your last childish swipe at me, so perhaps I should’ve been expecting it. As usual, you have chosen to perpetuate a concluded thread with a silly personal attack disguised as sage-like advice. Let me just clarify a few of the things you have drawn attention to:

  1. “things some people find hard to learn” - I know both PHP and SHTML very well. What I didn’t know was how they can interact on the DreamHost setup, because after learning PHP I saw no further use for SHTML.

  2. “imho that’s only another platitude” - it was not a platitude, it was an admission of fault.

  3. “reduce the continuing problem of bologna” - after being rude to everyone in that thread, zentao decided to use my website’s comment form to fan the flames. My carefully considered response was conceived to shut him up, which it did.

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

Speak for yerself.
I’ll have you know I am not “unsociable”. In fact, I am the living epitome of unmitigated blarney, get invited to all the best parties, and I am, of course, an original marvel of modern science.

“Tactless”, OTOH, is another matter. But despite of my somewhat curmudgeonly outlook on life, people love me anyways. Sometimes I hafta buy a round of drinks to facilitate that love, but that’s a mere technicality of the truth.


You are very welcome, though I don’t believe at all that you need to “stand corrected” in any way; I was only trying to help, not “correct”.

While I have noticed you “online” a few times since your last post, I have not seen the “new thread” about your problem. Are we to take it that you have the matter resolved?


Hey, I’m all for whatever it takes to “facilitate that love”…If you tell me where you drink, I’ll gladly show up and let you buy me a Wild Turkey!. :slight_smile:

There are lots of different types of “programmer-types”, but most stereotypes got to be stereotypes because they have some basis in truth - there is always rms to point to if anyone needs an an “quintessential” example of a “programmer-type” such as Simon might have been talking about. I happen to appreciate him greatly, but he has been known to ruffle a feather or two, and I suspect those adjectives have been used to describe him on more than one occasion. :wink:


It is not at all embarrassing. I cannot see the advantage to mixing SHTML with PHP, since PHP can perform all the functions that SHTML can. I would respectfully suggest that most web professionals are likely to use the same logic as I have.

As for your “cocksure” swipe at me, all I can say that I am delighted to be mentioned in the same breath as Betrand Russell, regardless of whether or not your intention was to pervert his quote to brand me as stupid.

As usual, you have tried to twist the meaning and intention of my various words and posts to suit your own peculiar agenda. Your actions, however, call to mind another quote from Betrand Russell that seems even more fitting:

“A stupid man’s report of what a clever man says is never accurate, because he unconsciously translates what he hears into something that he can understand.”

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]

At all my previous hosts, it didn’t work. PHP would only work with documents having a .php extension. I wrongly assumed this was the norm. My bad.

This thread was put to bed until you decided that it was so important to take a swipe at me. Time well spent?


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]