remote popen file check

A

ahso

Hi
I open a remote file with popen and check IDnr. Ok so far, now I want
to avoid multiple computers using the same Idnr. How should I do
alike? writing user's IP on host seems not a useable idea. Same for
writing something on the client side as he might need to reinstall?
Many thanks for ideas etc.
 
J

Jens Thoms Toerring

ahso said:
I open a remote file with popen and check IDnr.

Sorry, but what is that "popen" you're using? There's a popen()
function available on POSIX systems that creates a new process,
running another program via a shell with either the in- or output
of that program connected to a FILE pointer, But that doesn't
open a remote file (or only rather indirectly - if the command
you start via popen() is e.g. some ssh command that in turn
runs a program on the remote side that in turn opens a file you
might call this "opening a remote file"...). And what is this
"IDnr"?
Ok so far, now I want
to avoid multiple computers using the same Idnr. How should I do
alike? writing user's IP on host seems not a useable idea. Same for
writing something on the client side as he might need to reinstall?

I have not the slightest idea what you're writing about. Are
you sure this is a C++ problem at all? If this should be about
the POSIX popen() function the group comp.unix.programmer might
be a better place to ask.
Regards, Jens
 
J

Jens Thoms Toerring

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
 
A

ahso

I'm thinking about a simple/basic authentification. I want to avoid
users spread my app over various download sites and only give it to
users
with a valid number/id/serial whatever you call such.

So I check the number and unlock the app. The problem is to enable
only one user per number.
Thanks
 
A

ahso

yes kind of serial. I check the number but how to avoid multiple users
to use that number?
Thanks
 
J

Jorgen Grahn

J

Jens Thoms Toerring

ahso said:
yea probably ur brain too has stability problems...

Ok, let' see: Posting incomprehensible, off-topic stuff
and then becoming offensiv to people who try to help
you anyway. Mmmm, no, I guess I'm not going to miss any-
thing important.

<plonk>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top