Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9018585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:33:50+00:00 2026-06-16T04:33:50+00:00

I’m trying to build a quick tool using LogMeIn’s Rescue API. Basically what I

  • 0

I’m trying to build a quick tool using LogMeIn’s Rescue API. Basically what I want is to be able to enable and disable technicians quickly (even from a mobile device) without having to log into their cumbersome admin panel.

I have figured out how to get their secret password needed for SOAP queries, but I’m having some trouble working with the data when it comes back. The first step in my mini-app is to determine
the current status of the user, so I have a dirty quick test that runs a SOAP client request to their API URL for 2 user (or nodes as they call them). The issues I’m having is with the format of the data when it comes back.

Here is the code of the SOAP request:

$authCode = $_SESSION['authCode'];
$user1_status = "";
$user2_status = "";
$soapclient = new SoapClient("https://secure.logmeinrescue.com/api/api.asmx?wsdl");
$iNodeID = $user1; //The value of user1 is defined previous to this bit of code 

$getuserparams = array (
'iNodeID' => $iNodeID,
'sAuthCode' => $authCode
);

$getUserResult = $soapclient->getUser($getuserparams);

.
.
.
//SOAP request for the other user, same stuff

Now, if I add var_export($getUserResult); after the SOAP client received the data, I get something like this:

stdClass::__set_state(array( ‘getUserResult’ => ‘getUser_OK’, ‘oUser’ => stdClass::__set_state(array( ‘iNodeID’ => 11028674, ‘sName’ => ‘Tech Name’, ‘sNick’ => ‘Tech Name’, ‘sEmail’ => ‘tech.name@email.co.uk’, ‘sSSOID’ => ‘tech.name@email.co.uk’, ‘sDescription’ => ”, ‘eType’ => ‘Technician’, ‘bAccountHolder’ => false, ‘hasMobileAddon’ => false, ‘eStatus’ => ‘Offline’, )), ))

I’m actually only interested in the Technician’s name and his status to build a quick table or list with everybody’s status. Because of the var_export data, I suspect the stuff that comes back from the SOAP client is an array (I can only assume), so if I try to access it doing the following:

$status = var_export($getUserResult["eStatus"], true);
echo $status;

I get the following:

Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\rescue\admin.php on line 53

I have searched around and found a bunch of posts on here talking about the same thing, but I couldn’t find anyting referring to pure PHP, most of the stuff was in regards to CMS’s like WordPress.

Can you please shed some light on how should I read this data or “make it” into an array to properly need it?

At the moment I’m using a very, very ugly solution by hard coding the names in a table and getting the status as a string by cutting text with substr and str_replace.

In the future, I want to add other features to this thing like reporting and if I can’t figure out how to read this data properly, I’m afraid all that is going to be out of the window.

Many thanks for any help you can give me, I’m going nuts over this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:33:52+00:00Added an answer on June 16, 2026 at 4:33 am

    It’s returning you an object rather than an array, so you should try using object notation to access the properties:

    echo $getUserResult->oUser->sName;
    

    This might have been clearer if you used var_dump instead of var_export, which displays code required to recreate the object, rather than a straight breakdown of the object itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm interested in microtypography issues on the web. I want a tool to fix:
We're building an app, our first using Rails 3, and we're having to build
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.