Search Results

Search found 4 results on 1 pages for 'dave1019'.

Page 1/1 | 1 

  • advanced xml? multi level .. php parsing

    - by dave1019
    hi my knowledge of xml and php is somewhat basic but have been able to parse a simple xml document (one level) ~ <numbers> <number>1</number> <number>2</number> </numbers> i'm attempting to parse an xml document from a website providing the latest market prices for gold bullion. I think i'm going to need a paid professional but want to give it a shot the xml file looks like this: <envelope> <message type="MARKET_DEPTH_A" version="0.1"> <market> <pitches> <pitch securityClassNarrative="GOLD" securityId="AUXLN" considerationCurrency="GBP" > <buyPrices> <price actionIndicator="B" quantity="0.153" limit="23477" /> </buyPrices> <sellPrices> <price actionIndicator="S" quantity="0.058" limit="23589" /> </sellPrices> </pitch> </pitches> </market> </message> </envelope> and simply i have no idea how to access the values within the "headings". (whatever the term is) sounds like i'm asking for someone to do it for me, which I don't want, but I don't know what to search for ~ it doesn't look like a regular xml structure to me. thanks!

    Read the article

  • "mobile"-blogging - any ideas/existing solutions?

    - by dave1019
    hi does anyone know any sort of app that lets users visit a page on their mobile phone, enter information and have it update the website i believe the term is "mobile-blogging" but there isn't all that much on google or, is there any good resources for coding pages specifically for a mobile phone? I could probably design a script to insert blog posts on a site but not sure how it would work with a mobile. thanks for any pointers

    Read the article

  • Twitter RSS feed, [domdocument.load]: failed to open stream:

    - by dave1019
    hi i'm using the following: <?php $doc = new DOMDocument(); $doc->load('http://twitter.com/statuses/user_timeline/XXXXXX.rss'); $arrFeeds = array(); foreach ($doc->getElementsByTagName('item') as $node) { $itemRSS = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue, 'link' => $node->getElementsByTagName('link')->item(0)->nodeValue, 'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue ); array_push($arrFeeds, $itemRSS); } for($i=0;$i<=3;$i++) { $tweet=substr($arrFeeds[$i]['title'],17); $tweetDate=strtotime($arrFeeds[$i]['date']); $newDate=date('G:ia l F Y ',$tweetDate); if($i==0) { $b='style="border:none;"'; } $tweetsBox.='<div class="tweetbox" ' . $b . '> <div class="tweet"><p>' . $tweet . '</p> <div class="tweetdate"><a href="http://twitter.com/XXXXXX">@' . $newDate .'</a></div> </div> </div>'; } return $tweetsBox; ?> to return the 4 most recent tweets from a given timeline (XXXXX is the relevant feed) It seems to work fine but i've recently been getting the following error sporadically: PHP error debug Error: DOMDocument::load(http://twitter.com/statuses/user_timeline/XXXXXX.rss) [domdocument.load]: failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway I've read that the above code is dependant on Twitter beign available and I know it gets rather busy sometimes. Is there either a better way of receiving twits, or is there any kind of error trapping i could do to just to display "tweets are currently unavailable..." ind of message rather than causing an error. I'm usnig ModX CMS so any parse error kills the site rather than just ouputs a warning. thanks.

    Read the article

1