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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:21:13+00:00 2026-05-31T23:21:13+00:00

Simple question, I should think. Unfortunately, I couldn’t figure out how to get it

  • 0

Simple question, I should think. Unfortunately, I couldn’t figure out how to get it working.

I have an xml data sheet that looks like this:

<leads>
    <leadDetails>
        <lead_id>3886961</lead_id>
        <campaign_id>1173</campaign_id>
        <campaign_name>Tesco vs Argos - Submit (UK)</campaign_name>
        <subID>N/A</subID>
        <gateway>yes</gateway>
        <ip>109.155.249.140</ip>
        <referring_url>http://adworkmedia.com/gTemplate.php?GID=1514&pubID=2312&sid=&ST=
        </referring_url>
        <date>2012-03-24 07:19:07</date>
        <payout>$0.70</payout>
        <status>Credited</status>
    </leadDetails>
</leads>

I should add that this XML sheet is not hosting on my servers, but is dynamically updated as I get a new lead, by my network. Feel free to ask me more questions if needed.

MY QUESTION IS: How can I write a code that reads the XML page, and uploads, for each , the date, the IP, and the campaign_name to a mySQL table.

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-31T23:21:15+00:00Added an answer on May 31, 2026 at 11:21 pm

    Hi.

               if( $xml = simplexml_load_file("the_url_of_xml"))
                {
                  foreach($xml->leads->leadDetails as $detail) 
                  {   
                    $camp_id = $detail->campaign_id;
                    $camp_name = $detail->campaign_name;
                    $sql = "INSERT INTO myTable (id,name) VALUES ('$camp_id','$camp_name')";//AND so on
                    mysql_query($sql);
                }
    
               }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think I have a simple question, but I cant figure it out. I
I think this should be a simple question to answer. I have the next
A simple question I'm sure, but I can't figure it out. I have some
I have a very simple yes no question: should static methods have same result
This should be a simple question, but I can't get it to work :(
This should be a simple question, but I just can't seem to figure it
This should be very simple question. There are many programming languages out there, compiled
Maybe, it's very simple question but I couldn't get the answer. I've been searching
Simple question I think, after I have registered a few system-wide hotkeys with RegisterHotKey()
I have quite a simple question I think, but I need a definitive answer.

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.