You could use a public key encryption scheme. Crypt::RSA would seem like a good start.
Another option might be persistent sessions, CGI::Session might be worth a look.
Sorry for the vagueness of the answer, but there isn't enough information in the original post to be more specific.
2011-08-05 @ 1255Z Edited CGI::Session CPAN link
| [reply] [Watch: Dir/Any] |
I am the OP, I forgot to login when I post the question-_-
I don't think the encryption will work, as you need to expose the encryption method as some function, encrypt, and there's no way to stop a programmer to calculate it himself once he got the encrypt...
| [reply] [Watch: Dir/Any] [d/l] [select] |
No way? Uhm, that very much depends on your definition of "your system". And HTTP may be stateless, TCP certainly isn't (not that statelessness matters). In the simplest case, you have a network like this:
^-^-^-^-^-^-^ ^-^-^-
+^-^-^-^
+-------------+ / \ +-----------------+ /
+ \
| Your server |===< Local network >===| Router/Firewall |===< Big Ba
+d World >
+-------------+ \ / +-----------------+ \
+ /
v-v-v-v-v-v-v v-v-v-
+v-v-v-v
So, treat a request coming from your local network as "your system", and if it comes via the "Router/Firewall", it comes from somewhere else. And you block it. Preferably at said Router/Firewall.
Now, your details may be different, but your problem seems more a networking (and in particular, a firewall configuration problem) to me, than a Perl issue. | [reply] [Watch: Dir/Any] [d/l] |
Please think about it in web game context,where everything is happening in browser,and everything can be modified.
| [reply] [Watch: Dir/Any] |
Please think about it in web game context,where everything is happening in browser,and everything can be modified.
Eh, what do you mean by that? In this context, what are "your system", and your "web service"? Are both "your system" and your "web service" also running inside the same browser? Is your browser written in Perl?
| [reply] [Watch: Dir/Any] |
Please think about it in web game context,where everything is happening in browser,and everything can be modified.
Then you're back to challenge response
| [reply] [Watch: Dir/Any] |