Jump to content

Recommended Posts

Posted (edited)

hi all

i am making a script that u run a script on a PC and then send a shutdown command from another PC from another script through the internet

i'am using TCP functions

the problem is that i only know the IP address of the PC that will receive the command 

and when i want to use the TCP listen i and TCP accept i have to specify the ip to listen for (wich i don't have)

 

can i make the receiver PC listen to all IPs at a specified port ?

tnx in advanced...

Edited by alexander95

Posted

FireFox

 

bro: @IPAddress1 macro it give the local IP i am sending the command through the internet wich i must use the Global IP

You cannot listen to the global IP as it belongs to your local router.

You also need to create a port forwarding on that device in order to make this working.

Or a third party server in the middle where both PCs can connect to to receive the commands.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
Posted (edited)

bro

Who is bro?

 

@IPAddress1 macro it give the local IP i am sending the command through the internet wich i must use the Global IP

You don't understand how it works, the server listens for incomming connections so it uses its local IP.

 

You cannot listen to the global IP as it belongs to your local router.

It depends on how your network is made, but yes it's not a global IP for the individuals.

Br, FireFox.

Edited by FireFox
  • Developers
Posted

Jos

i'm sorry i don't understand what u mean 

u didn't understand the idea i'm talking about ? 

u want me to retell it with another words ?

The problem is that you are not making clear what you want to do so I asked you to explain it better.

Your title says you want to listen on any IP, but you clearly do not understand how this works when being on an LAN behind a LAT router connected to the internet.

So define clearly what you you want to do and you might get some better explanations and help.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

(bro) is a shortcut for (brother) , anyway i meant by saying it (my friend)

Actually I know that, I made you believe I didn't know :) Edited by FireFox
Posted

Your problem is solved?

If not, try the TCP examples of the beta helpfile.

Replace the server script IP by @IPAddress1 and the client script IP by the global IP of the server.

Br, FireFox.

Posted (edited)

I think he needs to make all the clients connect to one server or a database with the IP Addresses of the servers.

Edited by EKY32

[font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...