0

I am trying to convert this JavaScript code to PHP because I need for another script :

function Auth(reefssid, callback)
{
request({
    url: 'https://api.gigaset-elements.de/api/v1/auth/openid/begin?op=gigaset',
    json: true,
    headers: {
        'Cookie': reefssid
    }
  }
  )
}

So, I have the reefssid as a php variable named $reefssid, but I do not know how to send it through a GET request.

Does anyone have an idea? Thank you.

  • But I need to make the whole code in PHP –  Dec 30 '19 at 15:28
  • You need `file_get_contents()` or `CURL`. – GrumpyCrouton Dec 30 '19 at 15:29
  • This is what I tried, but I don't know how to make a GET request with CURL using the cookie –  Dec 30 '19 at 15:36
  • Do you have to pass it as a Cookie header or can you pass it as a simple $_GET param? This may help you with the CURL problem if you need to send it as a cookie - https://stackoverflow.com/questions/16872082/how-can-i-send-cookies-using-php-curl-in-addition-to-curlopt-cookiefile – GrumpyCrouton Dec 30 '19 at 15:37
  • I don't know, the only base I have is this Javascript code.. :/ –  Dec 30 '19 at 15:40

0 Answers0