ahso said:
Well, the example with popen() shown there (using curl) downloads
the file from the remote site to your machine. That, of course,
requires that a server for one of the protocols supported by
curl is running on the remote machine (and allows access to the
file you want). That's not what I normally would call "open a
file";-) So, if things work out ok, you will end up with an open
(rather likely temporary) file that's on your local machine, not
one the remote one.
didn't try that so far but do you think I'd run into problems? Seems
dead easy.
If you don't want to modify the file (since you will at best have
a local copy) and there's a server for one of those protocols
running on the remote machine, and the file can ge gotten at via
that server, then, yes, it should be rather straight forward.
You might run into trouble if you try to "jump back" in the file
though (at least under Unix your reading from a pipe and that
isnt seekable, i.e. you can't jump back to places you already
have gotten from the pipe).
PS: Yes i need it on Win/Mac/Linux, would that not be cross-platform?
I've not much experience with Windows but as far as I've seen
there seems to be a _popen() function available under Windows
that seems to be quite similar to POSIX's popen(), so I guess
you could use that.
So what about my question?
You still haven't told me what an "Idnr" is supposed to be
and what it is meant to be good for. And I'm also still at
a loss concerning what exactly you want to do with it, sorry.
Regards, Jens