Re: write with cURL



user@xxxxxxxxxxxxxx wrote:

Hi,

I want do create a new file and write something in it like:

$file = fopen("test.txt","w");
fwrite($file,"Hello World. Testing!");
fclose($file);

My provider doesn't allow this action for security reasons. However
they mention using cURL to do the same thing.

I have been searching the Internet to find out how to do this, but did
not find the answer. A did find a lot of answers to others questions,
but not this one. ;-))

So any help is appreciated very much.

Cheers,

Ylva

If your host says they deny opening and writing to a local file because
it's insecure, then it's time you find a new host that knows what they
are doing. There's not much point to hosting on someone that offers
PHP, if they don't allow PHP to open (or create) and write to files.
Are you sure there's not some other specific issue of why it's failing?
How exactly is is failing? I don't see the reason for them to mention
Curl as a replacement method for your task (that doesn't make sense).
Perhaps it's a permissions/ownership issue, or you're trying to open a
file over FTP/http or something on another site or system? A lot of
people deny open for URL's, which can be a good thing, so it might
depend.
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!
.



Relevant Pages

  • Re: The "new age" of html?
    ... level and is now competing with php, javascript, python and asp. ... My hosting provider gives me PHP, Perl, Python, C, ... As well as "Liberty Basic". ...
    (alt.html)
  • Re: The "new age" of html?
    ... level and is now competing with php, javascript, python and asp. ... group except that HTML can be a gateway to real programming, ... My hosting provider gives me PHP, Perl, Python, C, ...
    (alt.html)
  • Re: The "new age" of html?
    ... level and is now competing with php, javascript, python and asp. ... My hosting provider gives me PHP, Perl, Python, C, ... It isn't a web development system so it may be more ...
    (alt.html)
  • Re: configuration of Mysgl n PHP
    ... i want to configure mysql n php in rhel 5 so plz help ... Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers ...
    (comp.os.linux.misc)
  • Re: MySQL used with VB .NET 1.0
    ... While there maybe some sort of grapichal PHP tool, ... PHP works on windows as well:) I'm not trying to sway you ... hosting, then you will want to focus on something like PHP. ... If he is on Linux hosting and decides to stay ...
    (microsoft.public.dotnet.languages.vb)

Loading