Uh oh. Looks like your using an ad blocker.
Our site is support by ads that help to pay our hosting costs. Please disable or whitelist us within your ad blocker to help us keep the site online.
All money generate by ads and donations is used to pay the hosting costs of the site.
View Thread
Author | fwrite() | Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | | Is it possible to fwrite() on a server to a different server? If so, could some one give me an example, please? |
 |
Author | RE: fwrite() | Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | | Hey I have benn wondering about this thing too. Suppose an admin has 777 enabled on a directory. Can we use the PUT method to create our own files on the server?
Thomas |
 |
Author | RE: fwrite() | Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | | no its impossible for the way fwrite works.
but i do beleave there is another way to mess with a file that is 777 on a server. ill research it in a minute and post my finds.
|
 |
Author | RE: fwrite() | Member

Posts: Location:
Joined: 01.01.70 Rank: Guest | | fwrite() is usually used for local files, but depends. If you're talking about straight ansi C using stdio.h, then no, probably not. You could if you mapped a NFS share or something like that, but if you already have that type of access remotely, then I'm sure there's an easier way to do whatever it is you're trying to do. There's numerous c libs that support remote fwrites over various protocols, such as cURL and GASS.
Most scriptable languages have a friendlier approach to fwrite, particularly php. It support numerous types of remote connections to a server that could accomodate this, but again you'd need some type of pre existing link to the server (ftp, nfs, etc, or something along those lines, but again, probably an easier way to do whatever it is you're trying to do).
As for the PUT comment, I assume you mean an HTTP PUT, and yes that can work, but the server would have to be configured to support PUTs to begin with. Most don't (nor should they). Various httpd's have weaknesses in this regard, particularly older ones, but you can read about proper HTTP PUT's from head to toe at here for apache and here for IIS.
HTH
Edited by on 22-01-06 06:53 |
 |
|