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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:11:34+00:00 2026-06-09T22:11:34+00:00

Well, my problem is quite strange, because it really doesn’t make sense. 1)I have

  • 0

Well, my problem is quite strange, because it really doesn’t make sense.

1)I have a PHP script that brings a XML with some information stored in my MySQL database;

2)When I use this script (or any other) for the first time it brings me the all the information updated (all registries inserted ’til that moment);

3)When I use this script (or any other) again, no matter how many new registries i have in my database, it brings me only the registries that we’re brought the first time I used the script;

*I have tested this script on my browser, it works fine, always bringing the most updated state of the database.

What can I do?
Thx.

EDIT:

1) How I call the XML parser:

NSString *strURL = @"localhost/scripts/bringmethexml-x5.php";
NSData *dataURL = [NSData dataWithContentsOfURL:[NSURL URLWithString:strURL]];

XMLProcessor *processor = [[XMLProcessor alloc]initProcessor];
[processor syncProcessorWithData:dataURL];
NSMutableArray *a = processor.xmlObjects;

2) My PHP script:

<?php
    header("Content-type: text/xml");
    echo "<?xml version=\"1.0\" encoding=\"LATIN-1\"?>";
    echo "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">";
    echo "<plist version=\"1.0\">";

    function getXML($sql="SELECT user FROM database.Posts"){

        $conn   = mysql_connect ("localhost", "user", "password");
        $db     = mysql_select_db("database");
        $result = mysql_query($sql, $conn);
        $column = "";
        echo "<array>";

        while($row = mysql_fetch_assoc($result)){
        $column .= "<dict>";
            foreach ($row as $key => $value){
                $column .= "<key>$key</key>";
                $column .= "<string>$value</string>";
            }
            $column .= "</dict>";
        }

        echo $column;
        echo "</array>";
        echo "</plist>";
    }       
    getXML("SELECT user as USER, msg as MESSAGE, hashtag_1 as ST1, hashtag_2 as ST2, hashtag_3 as ST3, hashtag_4 as ST4, hashtag_5 as ST5, date as DATEPOSTED, coordinate_lat as COORLAT, coordinate_lon as COORLON FROM database.Posts;");
    mysql_close();
?>

3) How my the XML gets out:

<?xml version="1.0" encoding="LATIN-1"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <array>
    <dict>
        <key>(key || nome da fileira do db)</key>
            <string>(valor||object)</string>
        <key>(key || nome da fileira do db)</key>
            <string>(valor||object)</string>
    </dict>
    <dict>
        <key>(key || nome da fileira do db)</key>
            <string>(valor||object)</string>
        <key>(key || nome da fileira do db)</key>
            <string>(valor||object)</string>
    </dict>
    </array>
</plist>

4) XMLProcessor is a parser I made, it gets the NSData from the NSURL and then turns it in to a string and i parse it to fit it in a NSMutableDictionary, here’s a link for the class:

http://www66.zippyshare.com/v/7711833/file.html

  • 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-09T22:11:36+00:00Added an answer on June 9, 2026 at 10:11 pm

    An easy, if slightly hacky way of fixing this is to add a random variable to the url that you don’t really use for anything.

    for example http://www.yourwebsite.com/somestuff.xml?random=343453

    becasue the url is different each time, it will not use the cache.

    you can also do it by adding an anchor: http://www.yourwebsite.com/somestuff.xml#623764527

    Here’s a function to automate it, just apply it to your nsstring URLS

    yourURL = [self getUniqueURL:yourURL];
    
    
    -(NSString*)getUniqueURL:(NSString*)originalURL
    {
    
        NSInteger random = (arc4random() % 100000000) + 1;
    
        NSString* uniqueURL = [NSString stringWithFormat:@"%@#%d",originalURL,random];
    
        return uniqueURL;
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's a well known problem that executing make test doesn't build the tests as
Well. I'm having a problem with the eval(); function in PHP. I don't quite
well I have that problem, im using a lightbox srcipt and im opening an
Well, here is my problem: I have an application that uses a custom Javascript
I have a problem that is common, but I am not quite sure exactly
I am having a strange problem ( well, at least i find it strange
well i have most probably an extremly stupid problem but could not figure it
Tomcat has got that well-known memory leak problem that causes PermGen space errors after
Well i have a web page hosted in a IIS 7.0 now the problem
This image should illustrate the problem quite well: ( Fullsize ) As you can

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.