 |
26-11-2006, 11:13 PM
|
#1 (permalink)
|
|
In The Zone
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
|
Integrating VC++ and PHP
I have a program written in VC++. Is it possible to design any interface between them, like taking the input and displaying the output in php and the processing is done in the VC++ module? Please help. Do I need to convert the VC++ module to php?
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
26-11-2006, 11:20 PM
|
#2 (permalink)
|
|
String Phreak
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
|
Re: Integrating VC++ and PHP
Though I never tried it, I think it can be done! PHP is server side scripting language. So u need to enable local web server integrated with php. I don't know much about VC++ coz I used it only 2-3 times. So if u can display the output of the html code, then ofcors u can display for php code too!
__________________
Bad Bad server.....No candy for u!
|
|
|
27-11-2006, 07:48 PM
|
#3 (permalink)
|
|
Human Spambot
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
|
Re: Integrating VC++ and PHP
You will have to use file open, file close functions.
Make VC++ application write to a file. Keep the file name fixed or at least devise a logic to name it. Make PHP open that file, read the contents and process it the way you want.
But I have not clearly understood what you want to do. Please explain properly.
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
|
|
|
27-11-2006, 10:00 PM
|
#4 (permalink)
|
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
Re: Integrating VC++ and PHP
@Tuxfan, what he wants to do is this;
Take Input from PHP -> Do Processing in VC++-> Display output in PHP!!!
@Bukaida, Yeah, it can be done. Save the input contents in a database or file. Read the file
contents/ database in VC++ & do the processing in VC++. Now store the output
of the processing in another file. Read this file & show the output in PHP!!
__________________
* Imagination is more important than knowledge.
-Albert Einstein
|
|
|
28-11-2006, 06:44 PM
|
#5 (permalink)
|
|
Human Spambot
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
|
Re: Integrating VC++ and PHP
What do you mean by "Display output in PHP"? You mean, he wants to generate PHP code through his VC++? Then he has to simply use fopen (or fileopen or some similar command) and write a file!
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
|
|
|
01-12-2006, 03:47 PM
|
#6 (permalink)
|
|
In The Zone
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
|
Re: Integrating VC++ and PHP
ok, ok . I must explain the problem in greater details.Can I send an image like this? Actualy my OCR program is written in VC++ and The image is residing in another machine where the output is to be returned. Can I do it by the method mentioned by you? There is not much information about this in php manual.BTY I am using php4.4.0 with GD library support under apache 2.
The OCR software we are using requires huge amount of memory and processing power which a client machine cannot have.Moreover we want to provide it as a service rather than delivering the entire software to the client. It is a part of the e-Governance program, so they want to keep the main program with themselves. Can it be done with webservice or any other better way, I mean any other serverside scripting with java script support?
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
|
|
|
01-12-2006, 05:20 PM
|
#7 (permalink)
|
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
Re: Integrating VC++ and PHP
@Bukaida, Yeah, it can be done. Read the Image file using the OCR program written
in VC++. Save the image file as JPEG or PNG on the disk. Now use the PHP script to
display the image file to the client. The entire processing is done on the Server-side.
You can do it using PHP or Servlets or .NET.
__________________
* Imagination is more important than knowledge.
-Albert Einstein
|
|
|
02-12-2006, 03:41 PM
|
#8 (permalink)
|
|
In The Zone
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
|
Re: Integrating VC++ and PHP
@JGuru: The image is in the client's machine and the ocr is on the server. So I cannot directly read it. If somehow I can do it , it will solve my 75% problem.
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
|
|
|
02-12-2006, 05:29 PM
|
#9 (permalink)
|
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
Re: Integrating VC++ and PHP
@Bukaida, First transfer the Image (copy) to the Server , do the the processing on the
Server & transfer the Image back to the client. So do you have a single Image or series of Images?
You have to write a FTP program that transfers the file from the client to the Server.
Use the same program to transfer the Image back to the client after the processing
is done. From my view point Servlets will be more suitable for this kind of Project. Also
you can write a FTP program using JAVA API.
__________________
* Imagination is more important than knowledge.
-Albert Einstein
|
|
|
03-12-2006, 11:08 AM
|
#10 (permalink)
|
|
Human Spambot
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
|
Re: Integrating VC++ and PHP
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.
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
|
|
|
07-12-2006, 02:04 PM
|
#11 (permalink)
|
|
In The Zone
Join Date: Jul 2005
Location: KOLKATA
Posts: 267
|
Re: Integrating VC++ and PHP
@tuxfan and JGuru: Actualy the client server interface should be browser based. So that the client can just type the address of the server and do the processing. Since the scanned tiff file will be at the order of 20-25mb, it will not be possible to transfer the entire image through ftp.Also any lossy compression like jpeg cannot be applied at the client end as it will drasticaly reduce the ocr readability.So the client must select some area of the image to be transmitted preferably through browser(with java script).So this is the scenario.
__________________
Desktop: P-IV 2.4GHz, 512MB DDR, 865GBF Mother Board,
G-Force 5200FX, 17" Samsung flat, WinXp with SP2,
Kaspersky Internet Security 2009.
Laptop:LENOVO 3000 C100 D7 lappy with 2GB DDR2.
|
|
|
08-12-2006, 01:34 PM
|
#12 (permalink)
|
|
Human Spambot
Join Date: Feb 2004
Location: Mumbai
Posts: 2,653
|
Re: Integrating VC++ and PHP
If the file is too big to be transferred then you will have to have all things on the same server. I am afraid, you don't have too many options in this!  If its on the same server than you can do what I said in my first post at this thread.
__________________
:: Free hosting and free domain names available in special cases. Conditions apply ::
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|