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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:54:23+00:00 2026-05-25T05:54:23+00:00

I have been googling for hours and have not yet found a solution to

  • 0

I have been googling for hours and have not yet found a solution to this problem.

currently, I retrive the data from the twitter xml file: http://twitter.com/statuses/user_timeline.xml?screen_name=clubbluecanopy

everything works fine, my date format shows this: Fri Aug 12 03:25:40 +0000 2011
But I want it to show this: 17 days ago

here’s my flash as3 code:

var myXMLLoader:URLLoader = new URLLoader();
//myXMLLoader.load(new URLRequest("http://twitter.com/statuses/user_timeline.xml?screen_name=arunshourie"));

myXMLLoader.load(new URLRequest("twitter.php"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);

function processXML(e:Event):void{
var myXML:XML = new XML(e.target.data);
trace(myXML.status[0].text);

tweet_1.text = String(myXML.status[0].text);
time.text= String(myXML.status[0].created_at);



}

Here’s the php code:

<?php
/*
* @return string
* @param string $url
* @desc Return string content from a remote file
* @author Luiz Miguel Axcar (lmaxcar@yahoo.com.br)
*/

function get_content($url)
{
$ch = curl_init();

curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_HEADER, 0);

ob_start();

curl_exec ($ch);
curl_close ($ch);
$string = ob_get_contents();

ob_end_clean();

return $string;
}

#usage:
$content = get_content ("http://twitter.com/statuses/user_timeline.xml?screen_name=clubbluecanopy");
echo $content;
?>

I have used crossdomain.xml as well

would appreciate if someone can help me! 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-25T05:54:24+00:00Added an answer on May 25, 2026 at 5:54 am

    Fri Aug 12 03:25:40 +0000 2011 means Friday, 12th August 2011, 03hrs 25min 40sec GMT

    This is Flash’s native date formatted string

    You can create another function which will give you the required output:

        private function toRelativeDate(d:Date):String {
                var now:Date=new Date();
                var millisecs:int=now.valueOf()-d.valueOf(); //gives you the num. of milliseconds between d and now
                var secs:int=int(millisecs / 1000);
                if(secs < 60) {
                    return secs + " seconds ago";
                }else if(secs < 60*60) {
                    return Math.round(secs / 60) + " minutes ago";
                } else if(secs < 60*60*24) {
                    return Math.round(secs / (60*60)) + " hours ago";
                } else {
                    return Math.round(secs / (60*60*24)) + " days ago";
                }
            }
    

    You could use it as follows:

    time.text= toRelativedate(myXML.status[0].created_at);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have been Googling and I am quite sure my problem emerge from
I have been struggling with this seeminly easy problem for 48 hours, and I
Been googling this problem for hours, and cannot see where I am going wrong.
I have been googling this subject for hours. Does anyone have an examples of
I have been googling for hours looking for something to handle my situation. I
I have been Googling a problem that I have with trying to integrate the
I have been googling and stackoverflowing for the last two hours and couldn't find
Im sure this is simple, but I have been googling for an hour and
So I have been trying for hours to get this to work and I
Hi i have been trying this for hours upon hours, this forum is my

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.