[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/12/2009 at 12:48PM PDT, ID: 24805713 | Points: 500
[x]
Attachment Details

LogMeIn SSO Issue

Asked by duemes in PHP Scripting Language

Tags: logmein

I have the attached php code for SSO w/ LogMeIn.com and I'm getting two different errors:

XAMPP:  [function.file-get-contents]: failed to open stream: No such file or directory in C:\Program Files\XAMPP\htdocs\logmein.php on line 31

PHP (w/ Godaddy): Fatal error: Call to undefined function: http_build_query() in /home/content/n/j/p/njphcc/html/josh/logmein.php on line 25

Any ideas what's wrong?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
<?php
/****************************************************************************
This script will make a call to the LogMeIn Rescue Single Sign On service 
and if login is successful, a link to enter the Rescue account will show, 
otherwise, status is shown.
****************************************************************************/
 
//define login details
$SSO_Url = "https://secure.logmeinrescue.com/SSO/GetLoginTicket.aspx?";
$SSO_CompanyID = "mycompanyID"; //indicated in code from Rescue Admin Center Settings tab
$SSO_Password = "MyPassword";  //set in Rescue Admin Center Settings tab
 
//if using static SSOID
$SSOID = 'myfirst_lastname';
//if using web server auth, ie, company intranet auth
//$SSOID= $_SERVER['PHP_AUTH_USER']
 
//////////don't edit below unless you know what you are doing//////////
//set up array for http request
$url = array('SSOID' => $SSOID,
			  'CompanyID' => $SSO_CompanyID,
			  'Password' => $SSO_Password);
 
//build the url
$url = $SSO_Url . http_build_query($url);
 
//uncomment for debugging
print $url . "\n" ;
 
//get the response from the server
$return = file_get_contents($url);
$loginstatus = substr($return,0,3);
$loginurl = substr($return,3);
 
if ($loginstatus == "OK:"){ 
	//uncomment for debugging
	//print "\n" . $loginurl;
	
	//create link to login
	?>
	<a href="<?php echo $loginurl ?>">LogMeIn Rescue</a>
	<?php
}
else {
	echo $return;
}
?>
[+][-]10/12/09 05:11 PM, ID: 25556145

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/14/09 03:10 AM, ID: 25568741

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625