ip problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ajaymohank
    New Member
    • Jan 2008
    • 29

    #1

    ip problem

    hello friends........ ... i am doing a program in php in which i am passing 5 values to a bat file and based on that values a sketch is generated on a button click. both the program and the bat file are on the same system in c: folder. now when i acess my program using the ip from other systems in the office, the sketch is generated on the system which i operated, not the system from which i am currently calling the program. why is it like that.....

    thanks.
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    Hi,
    My best guess is because the bat is exectued by the php on the "server", and the other machines aren't recievin the rendered image.
    you will have to send this image over to the client machine.

    depending on how the bat works you could use a bit of content disposition.

    show me the bat file and i can advise further.

    Comment

    • ajaymohank
      New Member
      • Jan 2008
      • 29

      #3
      HI

      This the code for my bat file..

      @echo off
      rem CollabLand Environment Variables
      SET COLLABLAND_HOME =C:\CollabLand
      cd C:\CollabLand
      rem Start CollabLand.bat
      call startland.bat %*
      

      thanks

      Comment

      • harshmaul
        Recognized Expert Contributor
        • Jul 2007
        • 490

        #4
        hi,

        providing the other bats that you are calling are on the clients machine use this code....

        Code:
        <?php
        header("Content-type: application/bat");
        header("Content-Disposition: attachment; filename=notepad.bat");
        @echo off
        rem CollabLand Environment Variables
        SET COLLABLAND_HOME=C:\CollabLand
        cd C:\CollabLand
        rem Start CollabLand.bat
        call startland.bat %*
        ?>

        Comment

        Working...