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 4029116
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:18:16+00:00 2026-05-20T11:18:16+00:00

Using this post and the Tumblr API , I’m trying to embed the title

  • 0

Using this post and the Tumblr API, I’m trying to embed the title of whatever the latest blog entry is on my website.

For some reason, I thought this would be a nice simple code, but it returns empty. Have I missed something obvious?

// Contents of includes/latest_blog.php
<?php
  $request_url = 'http://###NAME###.tumblr.com/api/read?start=0&num=1';
  $xml = simplexml_load_file($request_url);
  $title = $xml->posts->post->{‘regular-title’};
  $link = $xml->posts->post[‘url’];
  echo 'Latest blog entry: <a href="'.$link.'">'.$title.'</a>';
?>

The website:

<p class="blog_title"><?php include('includes/latest_blog.php'); ?></p>

Thanks!

  • 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-20T11:18:17+00:00Added an answer on May 20, 2026 at 11:18 am

    Actually the code is fine, it’s just that you’re using fancy Unicode quotation marks as in‘regular-title’ instead of the ASCII single-quote as in 'regular-title'.

    Incorrect:

    $title = $xml->posts->post->{‘regular-title’};
    $link = $xml->posts->post[‘url’];
    

    Correct:

    $title = $xml->posts->post->{'regular-title'};
    $link = $xml->posts->post['url'];
    

    For some reason, you must have missed the error message, so make sure you see all errors while testing new code:

    ini_set('display_errors', true);
    error_reporting(-1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While browsing I came across this blog post about using the Wikipedia API from
I'm trying to read some JSON data from the Tumblr API. I'm using the
Using Tumblr's JSON API, I have embedded blog posts into another website. However, the
i'm using this code to post to my application page: $page_info = $facebook->api(/344722062246773?fields=access_token); $attachment2
I have grabbed some XML data using this piece of jQuery: $.ajax({ type: POST,
I receive POST request on my api.php script. The content red using this code:
I am trying to integrate a tumblr blog into a website. I have tried
I'm trying to register my tumblr website with Facebook in accordance with this tutorial
I'm using CodeIgniter for my website. I'm also using the tumblr API on my
In this post , the author is using: $.fn.wPaint = function(settings) { settings =

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.