|
-
Apr 27th, 2004, 09:03 PM
#1
Thread Starter
Fanatic Member
Client Functions
Hiya VB people, I'm looking for client operations returned to the server as a variable or somthing
1: Is there a way to read the windows registry of someone browsing a php coded page
2: Is there a way to read a file in a specific location (eg: c:\a.txt, with string "WOW!") of someone browsing a php coded page
2: Is there a way to write a file in a specific location (eg: c:\b.txt -> "COOL!") of someone browsing a php coded page
btw, it doesn't need to be php, any web-based language (like java, flash, java script, html, etc)
The goal of this application is for a server to interact directly to a game installed on a client, like who is playing what online, etc... There may be other ways to do so, but please answer the 3 questions first before suggesting something else, thanks in advance (hopes its possible :|)
-
Apr 28th, 2004, 03:40 AM
#2
1. No
2. No
3. No
Are you mad? Would you allow any page you visit to do these things to your computer? It would be absolutely crazy!
No web-based language has any access to data on the user's computer unless the user explicitely grants it (using the HTML file upload control). It would be a security hole to send a planet through.
Have you written the game yourself?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 28th, 2004, 03:46 AM
#3
You could try to use cookies in stead of files...
-
Apr 28th, 2004, 06:26 AM
#4
Create an ActiveX control for this.
-
Apr 29th, 2004, 02:03 PM
#5
Thread Starter
Fanatic Member
Originally posted by CornedBee
Have you written the game yourself?
Yes, And I just got told that someone remembered it was possible in Java Script. Sooo, anyone?
-
Apr 29th, 2004, 02:07 PM
#6
This someone is wrong.
Under certain circumstances you can use JScript, MS' variation of JavaScript, for such things. This, however, applies only to pages saved on the user's local computer and launched in a special manner.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 29th, 2004, 02:10 PM
#7
Thread Starter
Fanatic Member
Originally posted by CornedBee
This someone is wrong.
Under certain circumstances you can use JScript, MS' variation of JavaScript, for such things. This, however, applies only to pages saved on the user's local computer and launched in a special manner.
What special manner?
-
Apr 29th, 2004, 02:53 PM
#8
Frenzied Member
if you yourself made the game yourself, make it can send the data to the sever.
Have I helped you? Please Rate my posts. 
-
Apr 29th, 2004, 03:04 PM
#9
Originally posted by Ruku
What special manner?
Can't remember. Acidic is right.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 30th, 2004, 08:02 AM
#10
Thread Starter
Fanatic Member
Originally posted by Acidic
if you yourself made the game yourself, make it can send the data to the sever.
Yes, well that is actually the point of the program...
I need to interact in the most optimal way possible between the program and the server.
I can send variables to the server and everything, but the programs reception of the server will be mainly made out of cookies, which are quite easy to trick, now we thought of encryptions, but it will still be quite easy to breach...
So, If I were to create a file over the hard drive, and the program would read it encrypted with the user not knowing where the file is, it would be a security bonus.
For the registry, well it was mainly because I wanted to know what is the installed path of the program, since the user may have changed the default path.
It must be possible to get some of those files under your hard drive and I want to know how,
It's possible, because I know I've had a few times, one of those ad-bars that got installed automatically without me clicking yes to authorise any activities, also, think of all those ad-spams, I'm sure it's possible...! But instead of spamming something, the only thing I want is to interact between the program and the web... I have absolute control over the program, but for the web server, I don't own it, I am merelly an admin on it... soo
plz, help on this?
-
Apr 30th, 2004, 08:33 AM
#11
Most of the spam uses security holes or obscurities in IE. These things will not only not work in other browsers, but also slowly stop working in IE because of patches.
Ok, I need to consider this. What exactly do you want the user to do, with what result?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 30th, 2004, 08:38 AM
#12
Frenzied Member
CB, i think he wants the server to somehow recieve information about the game (score etc). The best way would be to have the game itself send the data.
depending on what language the game was written in, I think that after this thread, you'll have to ask how to send the data in another forum.
Have I helped you? Please Rate my posts. 
-
Apr 30th, 2004, 08:56 AM
#13
Thread Starter
Fanatic Member
Originally posted by Acidic
depending on what language the game was written in[/B]
This also something I am working on... We are enabeling the use of pretty much all languages with a program that acts as a mediator between the web and the game...
Now CornedBee, I want to be able to write a file on the harddrive for my program to recognize a script that will be executed threw the mediator program. Then the program will execute the script, if it's related to the game it will send information to the game by code that is already designed... For the rest,
I want to be able to see what users are doing, like basic status...
Player 1 is playing "pong 3D" -> string to send to the server...
well, kinda complex, I know, But it's the kinda program that will include all-in-one type of stuff, sorta like gamespy with a few cheap games and instant messenging, etc etc...
-
Apr 30th, 2004, 09:03 AM
#14
You shouldn't do anything of that through the browser, you should directly communicate between game and a special app on the server.
At least that's what I think based on how I interpret the information you give me.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Apr 30th, 2004, 10:17 AM
#15
Frenzied Member
that's exactly what I meant by the game sending data directly to the server.
Have I helped you? Please Rate my posts. 
-
Apr 30th, 2004, 10:57 AM
#16
Ex-Super Mod'rater
But if he doesn't own a server, I dont know of any Web Hosts that will let you run your own app on their server .
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Apr 30th, 2004, 11:04 AM
#17
Frenzied Member
ah, bugger it then. That sorta makes it a bit harder
Have I helped you? Please Rate my posts. 
-
Apr 30th, 2004, 11:30 AM
#18
Ex-Super Mod'rater
ofcourse if he has broadband theres nothing stopping him using a php file to keep track of his IP address then the clients will find out his IP address then his PC is the Server . That would work, then have a php file that he visits each time his IP address chnages so the web server knows it for people connecting.
If you get what I mean.
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
Apr 30th, 2004, 01:17 PM
#19
The game can send data to the web server using HTTP Post. The server can then send data back to the game giving it instructions such as creating a file, sending more data, etc..
You can do this with a PHP script, Perl script, ASP script or any other CGI program running on the server.
-
May 6th, 2004, 09:22 AM
#20
Thread Starter
Fanatic Member
Originally posted by Electroman
ofcourse if he has broadband theres nothing stopping him using a php file to keep track of his IP address then the clients will find out his IP address then his PC is the Server . That would work, then have a php file that he visits each time his IP address chnages so the web server knows it for people connecting.
If you get what I mean.
Yes, but in order to do that, I'd have to run a "dedicated server" always runnin 24h a day... which I can't afford...
and:
The game can send data to the web server using HTTP Post. The server can then send data back to the game giving it instructions such as creating a file, sending more data, etc..
That is pretty much the point, but to write the files from php, can't they be done within a specific location of the clients HD? OR simply copy a file from the cookies/tmp files to a specific location???
(btw, the possibility of any lanugage is still open, I posted the thread in PHP coz there is no section of general web programming languages...)
-
May 6th, 2004, 10:54 AM
#21
No, the server can merely send data back to answer the request, the game can then of course save the data to a file.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 6th, 2004, 12:18 PM
#22
Thread Starter
Fanatic Member
Originally posted by CornedBee
can merely send data back to answer the request
Ok, so the only way to do that is threw a cookie or a file in the temporary internet folder... hm, unless...
Would it be possible to download an executable file without any kind of prompt?
-
May 6th, 2004, 12:20 PM
#23
Frenzied Member
if that worked. Do you know how much spyware we all would have on our PCs?
Have I helped you? Please Rate my posts. 
-
May 6th, 2004, 12:25 PM
#24
Thread Starter
Fanatic Member
Originally posted by Acidic
if that worked. Do you know how much spyware we all would have on our PCs?
That's exacly my point I came across a program like that... So it is possible...
I know it can be used for freekin spam and damn ads, but It would be really usefull for my game!!! :'(
-
May 6th, 2004, 01:03 PM
#25
You need to get away from the notion that IE is all you have for "web". You game can contact the server and receive an answer. It can do with that info whatever it wants to do, even overwrite important system files with it (well, maybe not, if it's a well-set-up system).
Code:
<?php
header("Content-type: application/x-gamestats");
header("X-Save-Location: {gamedir}\\stats\\online.dat");
echo getOnlineCount();
?>
The only issue is that you have to parse the HTTP response, but that's not too hard.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|