-2

I want to login curl with php or another language

example site : http://192.168.1.1/cgi-bin/mystatus.cgi

when curl site will alert authentication below picture how to sign in for retrieve data

enter image description here

Athul Nath
  • 2,536
  • 1
  • 15
  • 27
  • 1
    Possible duplicate of [HTTP Basic Authentication - what's the expected browser experience?](https://stackoverflow.com/questions/2044340/http-basic-authentication-whats-the-expected-browser-experience) – Jordi Nebot Mar 26 '18 at 06:55
  • OK this issue resolve https://stackoverflow.com/a/19871279/9551013 thank you everyone – Prapat Polchan Mar 26 '18 at 08:05

1 Answers1

0

This is called HTTP Basic Authentication.

In order to authenticate use the CURLOPT_USERPWD option.

curl_setopt($curl, CURLOPT_USERPWD, "USERNAME:PASSWORD");