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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:59:54+00:00 2026-05-15T12:59:54+00:00

Hi I am trying to identify key Twitter influencers for a client and I

  • 0

Hi I am trying to identify key Twitter influencers for a client and I have a list of 170 twitter id’s that I need to learn more about.

I would like the script to loop through the list of Twitter Id’s and save the output to a single XML file –

http://twitter.com/users/show/mattmuller.xml

http://twitter.com/users/show/welovecrowds.xml

http://twitter.com/users/show/jlyon.xml

etc

In essence I need to write a script that passes each url and saves the output as a single xml file on the server. Any ideas on how to do this with PHP and do I need to use Curl?

Thanks for any help.

Cheers

Jonathan

  • 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-15T12:59:54+00:00Added an answer on May 15, 2026 at 12:59 pm

    This is a simple example of how could you achieve this using cURL:

    // array of twitter accounts
    $ids = array('mattmuller', 'welovecrowds', 'jlyon' /* (...) */);    
    
    $ch = curl_init();
    $url = 'http://twitter.com/users/show/';
    $xml = '<?xml version ="1.0" encoding="utf-8"?>';
    
    // make curl return the contents instead of outputting them
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    foreach($ids as $id) {
        // set the url base on the account id
        curl_setopt($ch, CURLOPT_URL, "$url$id.xml");
        // fetch the url contents and remove the xml heading
        $xml .= preg_replace ('/\<\?xml .*\?\>/i', '', curl_exec($ch));
    }
    
    // save the contents of $xml into a file
    file_put_contents('users.xml', $xml);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need help to identify the bug in my program that I have written
I am trying to identify all the nodes in a tree that lead to
I am trying to identify SQL INSERTS that occur when a record is viewed
I have been trying to reason about the best way to handle whether it
I have a long list of arrays which contain values. I'm trying to write
I have four tables that I am trying to join and output the result
I'm trying to identify if this is an IIS issue or a code issue.
I am trying to identify when an action without authorization has been made. Is
I am trying to identify a screen in a multi-monitor setup to save some
I am trying to identify duplicate serial numbers from the following xml using XPath

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.