Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conect to my server through my computer and a PERL program 1

Status
Not open for further replies.

NateBro

Programmer
Sep 1, 2004
233
US
ok, i am working on a program, and it will be ran from the clients desktop. i need it to read a file on our remote server. next i need to update this file (i'm guessing through a .cgi or .pl program located on the server). how can i do this without opening up a web browser? or is that the only way?

Thanks for your time and Help,
Nate_Bro
 
Depends on what services are available for you to use. If you can use something like SCP to move files around, there's no need for any additional code on the server. If that's not there, but Apache/CGI is, then it's probably easiest to make a small CGI app to do what you need. If that's not around, you could make your own service on the server. Should be relatively simple sockets programming to listen and connect, but that's much more difficult than either of the first two. Reuse the easiest services you have available if at all possible. Much better use of your time.

________________________________________
Andrew
 
you could use a remote dial in terminal, assuming you have an account and permissions. This would have been the common method prior to the advent of web technologies.
 
ok, well what i am working on, is a chat program like AIM. i have the client side GUI and program built, i just need to conect to my PERL script on the server, but i don't know how to do this with out a web browser window opened, my last program was a Web form, this i want to run client side.

I hope this asll makes sence,
Thanks,
Nate_Bro
 
Reading and updating a file would be simple with scp, but it sounds like something more featured than that, so I'd probably have to suggest looking at sockets. Sockets shouldn't be much more complicated than files, you open at an IP and port, then read and write to them. You generally want a parent process/thread to listen for new connections on a specific port, then make a new process/thread on a new port for each client for the real communication. There's probably a good tutorial or two about for it if you look for one.

________________________________________
Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top