Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 14th, 2007, 6:43 AM   #1
narrowdoctor
Newbie
 
Join Date: Jul 2007
Posts: 4
Rep Power: 0 narrowdoctor is on a distinguished road
Remote program control

Hi

I have some project to do.
There is a program which runs on server side. The program does some search functions.

I want to build web interface in order for web users input the search data on the site and when they press search the web interface interacts with the program on server side - copies the search text and "presses the search button" in the program.

I just really don't know if it can be done.. Could you help me?
narrowdoctor is offline   Reply With Quote
Old Jul 14th, 2007, 7:29 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Sounds like Google, doesn't it? Just have the search data submitted and pick it up on the server through the post variables. Respond with the results.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 14th, 2007, 7:35 AM   #3
narrowdoctor
Newbie
 
Join Date: Jul 2007
Posts: 4
Rep Power: 0 narrowdoctor is on a distinguished road
thats right, i just don't have any idea how to copy the data to search field and press the button int the program which runs on server
narrowdoctor is offline   Reply With Quote
Old Jul 14th, 2007, 7:46 AM   #4
francoissoft
Newbie
 
Join Date: Jul 2007
Location: Ohio
Posts: 19
Rep Power: 0 francoissoft is on a distinguished road
PHP already runs on the server. It just takes in and spits out data to the client.
__________________
FrancoisSoft
FrancoisSoft on the Web
If you stare at a computer for 5 minutes you might be a nerdneck.
If you learn Perl then you're missing out on PHP.
Never advertise unless you are a good business man.
francoissoft is offline   Reply With Quote
Old Jul 14th, 2007, 8:07 AM   #5
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You need to learn about the client/server paradigm, using http. Include the PHP manual in your list of resources.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 14th, 2007, 10:42 AM   #6
narrowdoctor
Newbie
 
Join Date: Jul 2007
Posts: 4
Rep Power: 0 narrowdoctor is on a distinguished road
lets do it simplier
i need each time when web user presses the button, the button in the program (exe program) on server side will be pressed. could that be done?
narrowdoctor is offline   Reply With Quote
Old Jul 14th, 2007, 12:14 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
The answers couldn't be any simpler than they've been. All you have to do is learn how the client and the server interact. It's done on zillions of web pages all the time. Look at the top of this page. See that search box up there?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jul 15th, 2007, 2:19 AM   #8
narrowdoctor
Newbie
 
Join Date: Jul 2007
Posts: 4
Rep Power: 0 narrowdoctor is on a distinguished road
i know what is client server interaction
you dont understand that the problem is on server side? no between client and server
narrowdoctor is offline   Reply With Quote
Old Jul 15th, 2007, 2:29 AM   #9
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 368
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
Hi,

From php, i don't think you'll be able to that. You won't be able to "press the button" on the application on the server
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Jul 15th, 2007, 3:35 PM   #10
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
It is possible. It will just be ugly. I'm not aware of any GUI automation libraries for PHP.

I'll assume for now that you are using Windows. Perhaps you could write an AutoIt script to perform the text pasting and button clicking...a quick search gave me this page, which demonstrates how to run a script from the command line as well as retrieve parameters (such as the search text to paste in). Alternatively, it seems you could access it via COM, starting with a line like
$autoit = new COM("AutoItX3.Control");
I forsee one problem, however. Services, such as your webserver and the scripts that run under it, will run under a different "window station" (collection of desktops) than the default interactive one for security reasons. If the application that you are trying to automate is launched by the webserver, it will be in the proper window station to begin with. If for some reason you intend to leave it running on some other user account all the time...which would be even more of a dirty hack than we're already talking about...then you'll have a lot more work to do, as autoit would not be able to touch it.

On OS X, you might use AppleScript (if the app supports it).

Not too sure about other platforms.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Language display in program Prm753 C++ 3 May 30th, 2006 5:45 PM
Creating a program to test a program sixstringartist C 8 Jan 21st, 2006 1:15 PM
How to have python control other program? Azratax Python 6 Apr 14th, 2005 10:09 PM
Using ODBC to connect to a remote database in a C program bigi C++ 1 Mar 8th, 2005 3:19 PM
C programing control of the Serial Port. Light C++ 5 Feb 24th, 2005 2:14 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:53 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC