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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:05:29+00:00 2026-05-30T03:05:29+00:00

Afternoon, I am using PHP Zend to search twitter API in order to find

  • 0

Afternoon,

I am using PHP Zend to search twitter API in order to find tweets with links, I can get the URL in the tweets using the entities array but I need to display the page title of the URL.

I am using DOMDocument() the following code below to get the title, is there any other way to get the URL title because it take an age for the page to load due to the pinging all the URL’s or is there some info in the twitter response I am missing?

function getTitle($Url){
        $urlContents = file_get_contents($Url);
        $dom = new DOMDocument();
        @$dom->loadHTML($urlContents);

        $title = $dom->getElementsByTagName('title');

        return $title->item(0)->nodeValue; // "Example Web Page"            
    }

Thanks in advanced!

J.

  • 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-30T03:05:29+00:00Added an answer on May 30, 2026 at 3:05 am

    If the following is indicative of the results you are working with.

    10.    {
    11.      "created_at":"Thu, 06 Oct 2011 19:36:17 +0000",
    12.      "entities":{
    13.        "urls":[
    14.          {
    15.            "url":"http://t.co/L9JXJ2ee",
    16.            "expanded_url":"http://bit.ly/q9fyz9",
    17.            "display_url":"bit.ly/q9fyz9",
    18.            "indices":[
    19.              37,
    20.              57
    21.            ]
    22.          }
    23.        ]
    24.      }
    

    Then it looks like some version of what you’re already doing is what you need. You can cache it either in a MySQL database or a flat-file. If you’re not familiar with either of those, make Google your friend. Cache won’t help initial load time, but will help the next time someone accesses the page

    You might consider letting the page load without titles, then fill them in with an AJAX call.

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

Sidebar

Related Questions

Good Afternoon, I am trying to get these results into arrays in PHP so
Afternoon all, Using the code below I'm trying to load what is render by
Good afternoon, I'm learning about using RegEx's in Ruby, and have hit a point
Afternoon Developers, I have a problem that's beginning to get on my wick. I
Afternoon guys, I'm using a SOLR index for searching through items on my site.
Good afternoon, I'm using version 5.4.1 of the Facebook C# SDK. I should note
Good afternoon all, I'm using a java.lang.StringBuilder to store some characters. I have no
Good afternoon to all, I have this scenario: I am using SQL Server 'BulkInsert'
Good afternoon, WinUSB is working well on the development computer that I am using
Afternoon, I'm trying to implement a hashtable in Java, using K mod 13 as

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.