Results 1 to 25 of 25

Thread: Client Functions

  1. #1

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655

    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 :|)


    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  3. #3
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    You could try to use cookies in stead of files...

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Create an ActiveX control for this.

  5. #5

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655
    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?

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  7. #7

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655
    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?

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  8. #8
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    if you yourself made the game yourself, make it can send the data to the sever.
    Have I helped you? Please Rate my posts.

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  10. #10

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655
    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?

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  11. #11
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  12. #12
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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.

  13. #13

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655
    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...

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  14. #14
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  15. #15
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    that's exactly what I meant by the game sending data directly to the server.
    Have I helped you? Please Rate my posts.

  16. #16
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    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.

  17. #17
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    ah, bugger it then. That sorta makes it a bit harder
    Have I helped you? Please Rate my posts.

  18. #18
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    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.

  19. #19
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  20. #20

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655
    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...)

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  21. #21
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  22. #22

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655
    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?

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  23. #23
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    if that worked. Do you know how much spyware we all would have on our PCs?
    Have I helped you? Please Rate my posts.

  24. #24

    Thread Starter
    Fanatic Member Ruku's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    655
    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!!! :'(

    Using VB.NET 2005/.NET 2.0, NetBeans IDE 5, Fujitsu Cobol85,
    Website: http://DreamForgery.com

  25. #25
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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
  •  



Click Here to Expand Forum to Full Width