How To Call *.exe Program From Php Program

May 2, 2001

I have a php program, and from that program I wanna call C program that counts number of visitors on my page.

This is a piece of my program:

View 7 Replies


Call A C Program From Read Program Output?

how to run a C program from a php script and store console output of the C program to a php variable?My program prints an integer value on the console using C printf() function. I want to read this value and store it in a php variable.I am using linux. I tried exec but it doesn't display the variable value once echoed to the pageThis the code snippet I am using.

exec("Release/matchface image1.jpg image2.jpg", $output);
while( list(,$row) = each($output) ) {
echo $row. "<br />";

View 1 Replies

PHP Running Exec() Windows Program Very Slow In Comparison To UNIX Equivalent Program

Does anyone have an explanation or solution for the following.
I have a PHP script that uses exec() to call a program to do certain

The UNIX version of this program I call runs in about 4 to 5 seconds.
When I run the same PHP script using exec() to call the Windows equivalent
of this same program on my Windows desktop, it takes about 32 seconds....

View 6 Replies

Terminal - Working .exe Program And Developing A Timer Program?

how can i develop an app which work in php.exe in my php folder and i need to know can i develop an app which will work continuously using this function and able to work it on my CPanel? EDITwhat i mean is,a principle one of my friend said to me to develop an page which is having a timer in it,in every 5 min it will check in a rss page for looking is there any change or new item is added or not?if we develop some thing like this it is difficult for us to work the php program again and again right??so i need some thing like that,

View 3 Replies

Create A Program That Analyzes Information That Is Exported By Another Program?

I'm creating a program that analyzes information that is exported by another program. That program exports it in this way:

Value1 Value2 Value3 Value4
Value1 Value2...

In order to insert them in the database, I first have to know how many lines are inserted. They get send through HTML post. I already tried:

$lines = explode("

View 4 Replies

Call A Script/program

If you modify a php script/program can you call the script yours? I mean if you make changes that enhances the value of the program or allows it to do more than in its original state, would you be able to call it your own? Or do you get part credit?

View 1 Replies

Call C Functions In A C Program?

When you download PHP's source you realize that all the goodies are in the ext/ directory in their respective array.c, string.c, etc. files.

Now, I was wondering, it is possible to call these functions from a C program having those PHP C files?

View 3 Replies

How To Call Out A Software Program

I have installed a software program and i am not able to call it out :Here is the error message which i do not have any clues of as i am non IT literate , that's why i come to this forum .


View 5 Replies

How To Call An External OCR Program

How to call an external OCR program from PHP?

View 2 Replies

Call A Python Program?

I've got a version of the A* algorithm that builds a graph of theUK road and cycle network in Python lists. t takes about 30 secondsto initialise, but once done can very quickly find the shortest routebetween any two vertices. The start and finish vex ids are providedby PHPI'm trying to work out the best way of communicating betweenPHP and the Python program. I only want to do the initialisation phasewhen the Apache server starts, so my question is: How do I keep thepython program alive and request routes from it via php? I have aGLAMP setup.

View 4 Replies

Exec() Call To External Program

We are trying to use the exec() or system() calls in a php script. The program we are trying to call takes 1 parameter in the form of:[usercode]

There are no spaces in the parameter at all and we have tried placing quotes around just to see if it mattered. We have also modified the parameter just to send it hello. Here is what we get: With no parameters the php script executes the program where it displays the error message from the program stating that not enough parameters were supplied. We then add the word "hello" to the end after a space so the command looks like this: command "hello" and the program no longer executes at all. No matter what we do, if we supply an argument to the command the php code will not execute the program.

View 13 Replies

Call Exec To Run An External Program Through A Form

I have problem with "Exec" function in PHP5. When I call Exec to run an external program through a form, it fails but when I run my PHP page by PHP interpreter like: PHP MyPHP.php it just works fine and external program executes successfully.

View 2 Replies

Call To Undefined Function Mysql_connect() In C:Program?

Fatal error: Call to undefined function mysql_connect() in C:Program FilesApache Software FoundationApache2.2htdocsplaincartlibrarydatabase.php on line 4

ini_set('display_errors', 'On');

View 1 Replies

Call A Program Stored In Hard Disk From Website?

I want my website to launch a java program (. jar file) stored in C:programfiles/livegraph etc.a how to go about it. I've been googling it to no avail.

View 6 Replies

Executing A Windows Command Line Program With System Call?

I am trying to execute a program using a system call inside a php file like so:

$newname = 'C:UsersJackDesktopupload est.ppt' ;
$program = '"C:Program Files (x86)Softinterface, IncConvert PowerPointConvertPPT"';
$input = ' /S "'. $newname .'"'
$destination = ' /T "C:UsersJackDesktopupload\"';


For some reason, the program enters an infinite loop (the browser never stops loading). I have tried the command manually and it works perfectly (takes about 2 sec to complete) but when executing it with a php file doesn't work.

View 1 Replies

Fatal Error: Call To Undefined Function Mysql_connect() In C:Program FilesApache Gr

I am getting the error :

Fatal error: Call to undefined function mysql_connect() in C:Program FilesApache GroupApache2htdocsfirstdbprogram.php on line 4

I have PHP 5 installed,apache and mysql.

PHP is installed in c:php

IN the phph.ini I have done hte following: Code:

View 13 Replies

Two Sessions: Session A By A Program Destroys Session B By A Program

I have two separate programs that I want to use together on a website
Program A starts first and calls session_start(). Program B is started by the user clicking on a link and it also calls session_start(). The session started by program B blows away the session started by program...

View 8 Replies

Sessions? External Program / External Program

I am trying ac ouple of days now to learn some things on SESSIONS,but I think I am not getting it very clearly. I have a PHP page tha contains a form.

Users enter data in the form, which are then written in a file (the file is created at the time a user enters some data) The file is then given as an input to an external program The external program runs and gives some results which are then stored in another file (that is created when the external program finishes) What I want to do is to somehow create these files and, when the user exits from the browser, then both files that refer to this user, will be deleted. Code:

View 1 Replies

Main Program Call Another Main [GET]

is it possible to call from a main program another one the same as it is
done by the browser?

If I begin I am able to do http://server/main.php?name="test" in the
browsers URL.

Could I do such a submission inside of a program and how?

View 3 Replies

PHP Used As A CGI Program

Manual for odbc_pconnect states: "Persistent connections have no effect if PHP is used as a CGI program." As I have just installed PHP on a PC with an Apache server, how does one tell if it is used as a CGI program, and if so, how does one confiure it not to be?

View 1 Replies

C Program And PHP

I have written this function in a C program, using Visual Studio. The
PHP script executes fine, but the output is not displayed. I have
been racking my brains for hours trying to figure this one out. The
output from the php program should print to a file called 'out.txt'.
The file is successfully created, but with no content. I am pretty
sure it's the way PHP returns the results. Does anyone have any
ideas? Any help would be most appreciated.

int passCode(void)
FILE *phpFile, *out;
size_t len;
char buffer[1000];

phpFile = popen("php -f testing1.php", "r");
if (phpFile)
out = fopen("out.txt", "w");
len = fread(buffer, 1, sizeof(buffer), phpFile);
fprintf(out, buffer);


return 1;
return 0;

View 1 Replies

How To Use ? And : In A Program

in the program below, what is the meaning/use of
the question mark (?gcd) and the colon (:$a) after the return statement?

function gcd($a, $b)
{ return ($b>0)?gcd($b,$a%$b):$a;}
$val=gcd($x, $y);
print "The greatest common denominator of $x and $y is $val";

This recursive program is used to find the greatest common denominator of 2

View 9 Replies

How To Program OOP

I use OOP for a PHP Application Framework I am programming. I have one base class which includes all the necessary functions and variables which all the other classes use. So what I originally did was that I made an instance of the base class and passed it to the other classes. Now someone insisted that this is not the way to do it.

so I used 'extends base' to make the base class available to the other classes. Afterwards it worked fine, but it didn't make the code smaller nor did it result in faster speed. I used the benchmarking script from PEAR. So I wonder whats the difference between those two solutions, both work fine. Are there some tools to analyse how much memory a script uses?

View 3 Replies

Run A Program.

I am using

system('GPA.exe ' . $filename);

to run a program GPA.exe

this program do the following things. ../GPA.exe filename.txt and will generate another file. HOWEVER, the problem is, there is no new file generated and I doesn't get an exception. I don't know why. Can somebody give me a clue?

View 3 Replies

Sig Program

I ran across a very cool little program today that I think I can reproduce for something I need on my site using PHP.

How do they give the URL a .jpg extension and still be able to have it run a PHP script and send a JPG back to the browser?

View 5 Replies

Run A C++ Program In Qt?

i need to automate my system.... for which i need to run a c++ program from a php function..

View 1 Replies

Copyrights 2005-15, All rights reserved