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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:48:21+00:00 2026-06-15T23:48:21+00:00

I have a small problem with my tweets script. But for some reason, I

  • 0

I have a small problem with my tweets script. But for some reason, I don’t know what the error could be. This is the error it gives me:

$url    = "http://www.twitter.com/statuses/user_timeline/{$username}.xml?count={$number}";
$tweets = file_get_contents($url);
$feed   = new SimpleXMLElement($tweets);

function time_stamp($date){
if (empty($date)){
    return "No date provided";
}

and on the index.php page, it’ll show this code:

<?php
    $username = "user";//your twitter username
    $number = 3;//number of tweets
    include ("{$dir}/php/tweets.php");
?>

Do you guys know what it is that I’m doing wrong?

  • 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-15T23:48:22+00:00Added an answer on June 15, 2026 at 11:48 pm

    You don’t need file_get_contents()

    Try:

    $url    = "http://www.twitter.com/statuses/user_timeline/{$username}.xml?count={$number}";
    $feed   = simplexml_load_file($url);
    

    Also, twitter made some changes not too long ago so your URL needs to look like this:

    $url = "http://api.twitter.com/1/statuses/user_timeline/{$username}.xml?count={$number}";

    Check this discussion.

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

Sidebar

Related Questions

I know that this question seems to be banal, but I have small problem.
I am generating new xml file using perl script but I have small problem,
I have a small problem but cannot figure out why. On my django shell:
I have a small problem that I want to load a url in web
I have small problem with http 404 error, after click on 'allow' on facebook
I have small problem. I'm trying to work on an XML file, but the
I have a small problem, I have some static content inside a div and
I have small problem but I can't just find an easy answer.I feel stupid
I have small problem and it might be silly somewhere, but still i have
I have small problem with prepare table. Generally I usually prepare this table in

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.