You need to set that in the registry. Do the following:
1) Open the HKEY_CLASSES_ROOT key to the registry.
2) See if KeyExists for "my_file_commands", or whatever you want to call it. Make it something related to your program. If not, create the key.
3) Add a "shell" key to this new key.
4) Add the commands you want the file to have as keys to the shell key, i.e. "edit", "open", "print", "printto", etc.
5) For each command key, add a value "command" and set it to the program to run for that file.
6) Add a new value to the root key with the filename extension, i.e. .php. and set this value to the key name you made previously.
That's it! So basically, in the registry, you'll see this:
+HKEY_CLASSES_ROOT
...
.php = php_auto_file
...
+php_auto_file
+shell
+open
+command = myprogram.exe %1
+edit
+command = myprogram.exe /e %1
Another way to view it is (and this is in microsoft's sdk):
HKEY_CLASSES_ROOT\.wri = wrifile
HKEY_CLASSES_ROOT\wrifile = Write Document
HKEY_CLASSES_ROOT\wrifile\DefaultIcon =
C:\Progra~1\Access~1\WORDPAD.EXE,2
HKEY_CLASSES_ROOT\wrifile\shell\open\command = WORDPAD.EXE %1
HKEY_CLASSES_ROOT\wrifile\shell\print\command =
C:\Progra~1\Access~1\WORDPAD.EXE /p "%1"
HKEY_CLASSES_ROOT\wrifile\shell\printto\command =
C:\Progra~1\Access~1\WORDPAD.EXE /pt "%1" "%2" "%3" "%4"
The %1 parameter is the filename, %2 is the printer name, %3 is the driver name, and %4 is the port name. In Windows 95, you can ignore the %3 and %4 parameters (the printer name is unique in Windows 95).
Hope all that helps.
Chris