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

  • SEARCH
  • Home
  • 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 6703639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:11:42+00:00 2026-05-26T07:11:42+00:00

I’m using the identica-php to get a single post using showStatus , just like

  • 0

I’m using the identica-php to get a single post using showStatus, just like this:

<?php 
    ini_set('display_errors', 1);
    error_reporting(E_ALL);

    include '../scripts/identica.lib.php';
    include '../misc.php';

    // your identi.ca username and password
    $username = $_GET['u'];
    $password = $_GET['p'];
    $userid = $_GET['uid'];
    $postid = $_GET['pid'];

    // initialize the identi.ca class
    $identica = new Identica($username, $password, "Terrarium");

    // fetch the timeline in xml format
    $xml = $identica->showStatus("xml", $postid);

    $identica_status = new SimpleXMLElement($xml);
    $status = $identica_status->status;
    $user = $status->user;

    echo '<div id="singleStatus">' . $status->text . "</div><br />";
    echo '<div class="single_posted_at">' . $status->created_at . " via " . $status->source . '</div>';
    echo '<img src="' . $user->profile_image_url . '" class="identica_image">';
    echo '<a href="http://identi.ca/' . $user->screen_name . '" class="nameURL">' . $user->name . '</a>: ';
?>

But when I try to run the code everything I got is this:
Result of the code

What I’m doing wrong? An example of the XML result: http://pastebin.com/Q52yfQp9

PS: I’ve tried to show just the XML to do a test and it worked, so it won’t be a problem with the Post ID or the XML, but in the code

  • 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-05-26T07:11:43+00:00Added an answer on May 26, 2026 at 7:11 am

    status is the root element of the XML, so it hasn’t a getter in a SimpleXMLElement object.
    Below your code revisited to work:

    //$identica_status = new SimpleXMLElement($xml);
    //$status = $identica_status->status;
    $status = new SimpleXMLElement($xml);
    $user = $status->user;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to create an if statement in PHP that prevents a single post
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.