Retrieve username, password parameters passed through curl

前端 未结 4 1344
轮回少年
轮回少年 2021-01-07 12:34

I am trying to send username and password parameters to a url using curl, and I want to retrieve them. I send the parameters to a page, like the following:

&         


        
4条回答
  •  自闭症患者
    2021-01-07 12:52

    you can find the username and password in the global $_SERVER array

    $_SERVER : array
    (
         ....
        'PHP_AUTH_USER' => 'the_username'
        'PHP_AUTH_PW' => 'the_password'
    )
    

提交回复
热议问题