Solved

Send commands through IP address

Posted on 2001-08-11
13
214 Views
Last Modified: 2013-11-13
Hi , Iam bulding a programe which will be used in a company which has 2 office every office in a diffrenet
city , they are always connected to the net so i want to know if i put my programe in both offices how
can i determind the ip address and how can i send commands and information from my programe in one office
to the other , thanx a lot , iam using VB6
0
Comment
Question by:ashraf_t
  • 7
  • 5
13 Comments
 
LVL 1

Expert Comment

by:DandL
ID: 6375596
You would need to have one sever.  This sever can live on your machine.  There are two different protocals witch you can use.
1.TCP/IP
2.UDP
The best way to get started with these two protocals is to spent some time in the MSDN look up "tcp and udp network services". There it will tell you about the "winsock control".  There is code there for a chatt program. Compile that program and start from there. Compile it for the UDP and TCP.  It is pretty basic and easy to understand.


As to your question:
>how can i determind the ip address and how can i send commands and information from my programe in one office

 This is done by writting a client for you server. Your server will/should have a static IP.  When you load the client program on a machine it can contact your server through your static IP address.  If you use tcp or udp once the client contact you you can get the ip at that time.  Again this is all explain in the MSDN.

If this comment was to elementry then I can supply more indepth info. Just tell me

DandL
0
 

Author Comment

by:ashraf_t
ID: 6375915
No the IP may differ from one time to another it is not static
0
 

Author Comment

by:ashraf_t
ID: 6376046
I saw that in a computer game called fifa 2001 , 2 players can play against each other through i address
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:BozzoCage
ID: 6376135
0
 
LVL 1

Expert Comment

by:DandL
ID: 6376307
Yea there are a lot of online games that allow two or more players to play agianst each other. The way that is done is when you first must connect to there web site first. You are connecting to them through a static ip.  Or if you have a lan party you are making one computer the server and then detecting the server in that small lan.

On to a posible solution to your problem....

What you might be able to do if the IPs are not static, is to use the MAPI control that vb offers.  The mapi control is an e-mail protocal that you could use to have the client email you there IP. Then you contact them through a tcp connection.  The code for a client to detect there IP is just a few lines( if your doing it in VB).  An since you are working for a company then you have an e-mail address right.  Well you could probable request an e-mail address that is just for this project.  Well when you receive an email you can parse the email to get the ip that the client sent you...then pass that in as a parameter to your sever. Then connect to the clients machine. "send commands and information " 
0
 

Author Comment

by:ashraf_t
ID: 6377825
is this mail must be POP3 or it could be a free mail like hotmail , can mapi handle with this kind of free mail
0
 
LVL 1

Expert Comment

by:DandL
ID: 6378054
I'm not sure... I just opened the msdn mail project/code and am playing with it. It sends and recieves mail fine.  If you do not have msdn I can e-mail you the file ziped up. It is small under 8.k

Just let me know.
0
 

Author Comment

by:ashraf_t
ID: 6378152
Ok DandL pls send it to aaet@mailexcite.com , thanx
0
 

Author Comment

by:ashraf_t
ID: 6382384
Ok guys , now i can make a programe using IP address , i got it from ur help and from vb help i take the example they provided , make some changes , but it can not coonect although i can connect on my computer but when i gave it to a friend ant try to connect to him it doesnot work , what is the problem , i can send my programe to anyone of you , can anyone take it and tell me what is wrong with it
0
 

Author Comment

by:ashraf_t
ID: 6387647
Why u didnot answer guy, r u give up?
0
 
LVL 1

Expert Comment

by:DandL
ID: 6387986
No just real busy.  If you want to reply to that email I sent you then I will take a look at it.  Though, I will not be able to get to it today. But I will as soon as I can.
DandL
0
 

Author Comment

by:ashraf_t
ID: 6396472
Ok Dandl tell me ur email
0
 
LVL 1

Accepted Solution

by:
DandL earned 100 total points
ID: 6396857
you could either just reply to the e-mail I sent you or send to
jdgidcumb@peoplepc.com
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# code editing and collaboration 3 130
What language/protocol is the Angular Chat? 2 83
Excel Automation VBA 19 88
Collapse and expand table in Word 2010 2 29
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question