This is my understanding. Correct me if I am wrong:
1. You transfer image from machine A to machine B which has VC++ module for OCR.
2. It returns you "TEXT".
3. You want to use PHP module on machine B to display that text.
If this is true then you will have to transfer a file thru FTP from one machine to another. There's no other way
If your PHP module waits for input from VC++ module, it could sometime create problems because they are two different machines and therefore connectivity quality depends on a lot of factors. So you may have to set up a cron job to automatically keep checking for existence of OCRed text file and then email.
The VC++ module can directly generate the code with the required HTML tags and so the PHP module can simply use the print() function.
But if I know more about the real application and its needs I may be able to give some more suggestion which are a bit more appropriate.
UPDATE:
This one more thought has come to my mind.
You can keep a database on the machine with PHP. VC++ module may remotely connect to the database from the other machine and update it.