Subversion Repositories Applications.annuaire

Rev

Rev 599 | Rev 602 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 599 Rev 600
Line 18... Line 18...
18
		$url = "https://cas.recolnat.org/v1/tickets";
18
		$url = "https://cas.recolnat.org/v1/tickets";
Line 19... Line 19...
19
 
19
 
20
		$curl = curl_init();
20
		$curl = curl_init();
21
		curl_setopt($curl, CURLOPT_URL, $url);
21
		curl_setopt($curl, CURLOPT_URL, $url);
22
		curl_setopt($curl, CURLOPT_POST, true);
-
 
23
		curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
22
		curl_setopt($curl, CURLOPT_POST, true);
24
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
23
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
25
		curl_setopt($curl, CURLOPT_POSTFIELDS, "username=$login&password=$password");
24
		curl_setopt($curl, CURLOPT_POSTFIELDS, "username=$login&password=$password");
26
		$res = curl_exec($curl);
25
		$res = curl_exec($curl);
27
		$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
26
		$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);