0

I have a browser controllable smart pluck outlet, which I can control by calling a URL. I know I am aware of the command

open http://192.168.1.175/cgi-bin/relay.cgi?off

But that opens a tab in the default browser (which is chrome). Is there any way to call the url without actually causing my browser to open a new tab? Could I somehow call the url "in the background"?

Thanks in advance

1

You can use curl or wget for this purpose:

curl http://192.168.1.175/cgi-bin/relay.cgi?off

wget http://192.168.1.175/cgi-bin/relay.cgi?off

If you need to use a method other than GET, curl is more appropriate.

0

The previous answers of curl and wget are good ones. For a slightly more obscure method, you could also issue the HTTP command yourself over a socket. For example...

echo -e "GET / HTTP/1.0\n\n" | nc www.google.com 80
  • You can use good old telnet command also :) – Romeo Ninov Feb 5 '15 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.