How to call specific data in json object - php

Ok I am making an api call to google places API and getting back a JSON object. I have been able to do work with this object with Ajax but now I have to integrate my code into a Wordpress instance and I am making the API call inside functions.php because I want to use the get_theme_mod(); method.
Since I am fairly new to php I don't know how to output specific data from this object.
My object is below, I am trying to access the reviews returned by this object (all 5). I know I can do this with Ajax fairly easily but I am really struggling with the syntax in PHP.
This is my PHP API call
function do_api_call(){
$url = $my_url;
$data = file_get_contents($url);
$rev = json_encode($data);
echo $rev;
}
{"html_attributions":[],"result":{"address_components":[{"long_name":"76","short_name":"76","types":["street_number"]},{"long_name":"North Main Street","short_name":"N Main St","types":["route"]},{"long_name":"Concord","short_name":"Concord","types":["locality","political"]},{"long_name":"Merrimack County","short_name":"Merrimack County","types":["administrative_area_level_2","political"]},{"long_name":"New Hampshire","short_name":"NH","types":["administrative_area_level_1","political"]},{"long_name":"United States","short_name":"US","types":["country","political"]},{"long_name":"03301","short_name":"03301","types":["postal_code"]},{"long_name":"4915","short_name":"4915","types":["postal_code_suffix"]}],"adr_address":"<span class=\"street-address\">76 N Main St</span>, <span class=\"locality\">Concord</span>, <span class=\"region\">NH</span> <span class=\"postal-code\">03301-4915</span>, <span class=\"country-name\">USA</span>","formatted_address":"76 N Main St, Concord, NH 03301, USA","formatted_phone_number":"(603) 856-7181","geometry":{"location":{"lat":43.20638719999999,"lng":-71.53594079999999},"viewport":{"northeast":{"lat":43.20770828029149,"lng":-71.53477561970848},"southwest":{"lat":43.2050103197085,"lng":-71.5374735802915}}},"icon":"https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png","id":"9496ddb6eb5f976d65d829a5bc2a11c16235f24c","international_phone_number":"+1 603-856-7181","name":"The Crazy Goat","opening_hours":{"open_now":true,"periods":[{"close":{"day":0,"time":"1800"},"open":{"day":0,"time":"1200"}},{"close":{"day":2,"time":"2200"},"open":{"day":2,"time":"1200"}},{"close":{"day":3,"time":"2200"},"open":{"day":3,"time":"1200"}},{"close":{"day":4,"time":"2200"},"open":{"day":4,"time":"1200"}},{"close":{"day":5,"time":"2200"},"open":{"day":5,"time":"1200"}},{"close":{"day":6,"time":"2200"},"open":{"day":6,"time":"1200"}}],"weekday_text":["Monday: Closed","Tuesday: 12:00 – 10:00 PM","Wednesday: 12:00 – 10:00 PM","Thursday: 12:00 – 10:00 PM","Friday: 12:00 – 10:00 PM","Saturday: 12:00 – 10:00 PM","Sunday: 12:00 – 6:00 PM"]},"photos":[{"height":1536,"html_attributions":["The Crazy Goat"],"photo_reference":"CmRaAAAAuVKW68MbnuWHZyE8nw6AfMeYfqR8hoZBNmlFFReExDzbgqrkY2NtZro_f8cBWLRzVTajatvGjpv9Mffqv_zeCFuGJIz0jBreCN-0d8YQkc11gzjwZT_-TVS-dwvvx0efEhD_NXSEyy9Q7VZJd2tIFK_iGhT-pd1t-6YpKzhr8nVvaGlfFv36gw","width":2048},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAA8jPB2uPOxWd_-1inL9GMO7tWdIfhvaVCYFODb2yessHQ_Jy7Wyo99z9Qrlohho0tdFlz4GyuGgtO1CEirdeLYJJb25QbX4ZdBClQwDjYBDUC0spd_tPFLAnsFCLk664ZEhBGqm26u-aeqnDBQzWKPTc2GhR2OUmpnyErQr3rsbmOC92nva595A","width":4032},{"height":2988,"html_attributions":["Vicky and Snickers Anderson"],"photo_reference":"CmRZAAAAk-Z3Ml_aMD8_xwpZBT85JDfd9dtrq_LponeZICHGhbRp1KozF4H8Ig36ikIYcbJyH0DWf-4_ylRWviWYDBkuJWcKyvHRSzjquxuE_MNN5FjjkWX3aPBcNWxTnh9RQ8OcEhAE9Y91__B86071fFBuZFDAGhSF5XxgaAxsUl8Im4_lgVCMIgGPNA","width":5312},{"height":4032,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAAgaVjlQzuv7F-88pv8GPd-IkGzo9oH1gQoKc_ZmVmQjVqWeeljkVLSsti3oLzkau3IXW3JOJ7KyOvlsOUTGNOJnBA31OIttfCbmCFPSCiyywmu7yUHnf_w0CKLw5hT_RWEhCpSZtnAKj3umsNcJUtI7K3GhR4g14ff5ekvKuB_rW0YlL_FWotxg","width":3024},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAA3so1UtaPCAqJlbpxhyfbBefycY4FspxrNPDBH-xeBoTMTgkTCb3uT9p8l3Umgu2VpCatqTu3fDFgbj5VmjNGvk7ngtYYhD2UCMXoCxuxHjL9kzvoaDdL8SoyJUFWBnlZEhCeTxLqrBsM8R6IPd8iK_h2GhTmgvfEor4xDZNha0teaiw3KyHhrQ","width":4032},{"height":4032,"html_attributions":["Michael Brady"],"photo_reference":"CmRaAAAAlxoITLsevfPLrsV5rCHt1IuJBs-sKE6tTuQmmKg6xbAi2puyrhlG3aEY9GoFUCRpApEL30TssUQPN31U6kkCdIDofmJktXYvpvJ9nb2EItJDyVE32s7XE15XJEx3mvPKEhA19O6fhPnSKbSD2bE-lTqPGhRjw-0d1TspjpQC3yhez71pWyJKOA","width":3024},{"height":2592,"html_attributions":["Maxwell Murdoch Snelling"],"photo_reference":"CmRaAAAApttZtrF9LRbcVHeCokgPipfdh-Gs-v6G9ze8vAXh2YPP8PEx3cWy7AEgY72_79VFPAMWTkKgbrOceNiqn7t6R0USgUvD9hnPq_WLc9jPt-Fbwt0HwoO2QZtb0l7Xry_IEhD9SRgHx9fiVLGWyxfIs67LGhSprzTG6Srq3f4HkpBZhytA__2wvQ","width":1944},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAA2lGLeytP1Eo0nIe_a-ml4eW9xdMXbiTo8BQij_tL2IBtd9Qd1pJDEhPEF-4ypXhraLSgTLa9Bv8D6pOelpvRoEw3GoO5_G1ZPyV5cDqqRXYEaZL7AGN77otQ0Qo50rb9EhBK4oPCeFf4BKD5_lyjfqKmGhR59yKmhuLhv-qTKzyD0jlau1YwHQ","width":4032},{"height":5312,"html_attributions":["Dennis Shanoff"],"photo_reference":"CmRaAAAAdlDGdD00jBf5hOZ49bpJUfjPzH0m0G5sIXOkP5KEqbksfqL33k-9uxUyW3LqhJjat4Jbggq6C_8bmfsclSFjdhJz2NayfOsE-nyyMNEN-GwPtZfhpc50HT9Nkn5jKNWxEhCCkJ6WpbssuAGn-JdibF_LGhSPJDtJGvkFcwb6HRhoVxWBrR4EbQ","width":2988},{"height":3024,"html_attributions":["a beauregard"],"photo_reference":"CmRaAAAAL5u0ksBwwzBYwycDHNqTEtKqdaGpPRB9REBvNVl_6E4HgiuEOkYpZphocizNd-EozrlE05Zwz1wC2ZcibsqF0CI3-wP8yJyFC76Lu-yZkHrNyAUxs85GGg8xOLTUAzlXEhBQne5bG7eQQn8pW8DszBqVGhQqkbf-vt6WC8QRdGzuGeUpoYQaww","width":4032}],"place_id":"ChIJbQa_U41q4okRJsbAM3zX_WM","rating":3.4,"reference":"CmRRAAAAPU4b-A3ebudL3C27zOGt3pH0uqRXiRmY_feRH3O4SXJpIB7ghnQRsOwDRe0nUssISkr3V_pdwv6BXxHeMvneYGUWLFOTRe_aUlnDQKGpkrXj3bOoFBx7QGdo5ZWgJbKpEhDIJX5_r27SlpSsb9hLIpHZGhSC_JiK3IVPnom3nuQLNOOXZUFsaw","reviews":[{"author_name":"Papa Joe Gaudet","author_url":"https://www.google.com/maps/contrib/111381118825182249763/reviews","language":"en","profile_photo_url":"https://lh4.googleusercontent.com/-lJEMylIg98M/AAAAAAAAAAI/AAAAAAAATvY/njN-66RVAp0/s128-c0x00000000-cc-rp-mo-ba5/photo.jpg","rating":5,"relative_time_description":"2 weeks ago","text":"I dropped in on a cold quiet Tuesday evening. The food was outstanding as was the service. I wish I had more time to enjoy the atmosphere. Next time (and there will be a next time), I'll bring a date. She'll very likely appreciate my good taste. BTW, they are hiring right now and the staff looks happy.","time":1515541362},{"author_name":"Christine D'","author_url":"https://www.google.com/maps/contrib/110635532521172813159/reviews","language":"en","profile_photo_url":"https://lh6.googleusercontent.com/-neX3OzkbUe4/AAAAAAAAAAI/AAAAAAAAAAA/AA6ZPT6K8ZOkQiewnkB6bxg3VaKuVFIa5Q/s128-c0x00000000-cc-rp-mo-ba4/photo.jpg","rating":5,"relative_time_description":"a week ago","text":"Late lunch on a Friday afternoon. We had sandwiches (a burger and chicken sand.) which were both quite good. Flat bread with goat cheese bruschetta app was delicious! Waiter/bartender was knowledgeable and SO personable. Even if we had struck out with our food selections he would be reason enough to go back. He engaged with every patron in the place. The only thing I'm sorry about is that I didn't get his name. The Crazy Goat is lucky to have him.","time":1515820810},{"author_name":"Lee Goodwin","author_url":"https://www.google.com/maps/contrib/117058651202426601746/reviews","language":"en","profile_photo_url":"https://lh4.googleusercontent.com/-XcqH9W_RTeY/AAAAAAAAAAI/AAAAAAAAAEI/Y75Cnl2eE_k/s128-c0x00000000-cc-rp-mo/photo.jpg","rating":5,"relative_time_description":"a month ago","text":"The food is delicious. I had a special of stuffed roasted acorn squash, unreal. The atmosphere and server John were excellent. Can't wait to come here again!","time":1512852799},{"author_name":"happy2say1hello","author_url":"https://www.google.com/maps/contrib/109024209580809571111/reviews","language":"en","profile_photo_url":"https://lh3.googleusercontent.com/-Oct8pO1R3w4/AAAAAAAAAAI/AAAAAAAAAAA/AA6ZPT4gyixHn6uuGcL_-2l1PmC9ztLTUg/s128-c0x00000000-cc-rp-mo/photo.jpg","rating":1,"relative_time_description":"a month ago","text":"I worked here and the owners treated the staff like garbage. Worst job experience I've ever had. Not to mention the food wasn't that great but so expensive. Please save your money for a restaurant that treats its staff better.","time":1512504706},{"author_name":"Tracy Long","author_url":"https://www.google.com/maps/contrib/102667733449818335247/reviews","language":"en","profile_photo_url":"https://lh4.googleusercontent.com/-uc5qHDhCNjs/AAAAAAAAAAI/AAAAAAAAAAA/AA6ZPT6KjwgNKU-cDRvtgpFDyG809i0BlA/s128-c0x00000000-cc-rp-mo/photo.jpg","rating":3,"relative_time_description":"in the last week","text":"Server was very personable and friendly. Food was ok. Very limited menu. Liked the ambiance.","time":1516936344}],"scope":"GOOGLE","types":["restaurant","food","point_of_interest","establishment"],"url":"https://maps.google.com/?cid=7205151907306849830","utc_offset":-300,"vicinity":"76 North Main Street, Concord","website":"http://www.crazygoatconcord.com/"},"status":"OK"}

Try this:
$rev = json_decode($data,true);
$reviews = $rev["result"]["reviews"];
foreach($reviews as $review){
$author_name = $review["author_name"];
echo $author_name."<br>";
}

Related

How to send message content when a router got hit it will send the first content then the second

Actually I want to send message when A page is hit. Like I have a page called numbers.blade.php. Here is the route
Route::get("/numbers", [\App\Http\Controllers\NumberController::class, 'get_numbers_from_ringba'])->name("numbers");
When I will get to this route a message will be sent.
Here is the code:
public function get_numbers_from_ringba()
{
$numbers = Number::all();
$contents = array(
"We apologize that your call was dropped. We have qualified you for a simple, low-cost health insurance plan. Contact us at +18883470772 again within 1 minute to find out more about your free, no-risk health insurance plan!",
"Hi, Congratulations! As an apology for the dropped call, We are currently offering you a limited time 20% discount on the ACA Insurance Plan, just for you! Please reach us again at +18883470772. Grab the Lifetime HealthCare Opportunity within a Minute!",
"Still not Happy with our 20% discount? We have reserved a special enrollment opportunity just for you and your family (all-inclusive medical protection & 25% Discount)! Reduce your chances of becoming ill or injured with ACA, as 14.5 million US citizens have done. Call Now: +18883470772 before the offer expires Today!",
"We do not want to bother you, just following up about our ACA plan. We can help get your ACA health insurance fixed so your life is more manageable. If you apply today, you might be able to get free health insurance through the Marketplace. Call us +18883470772",
"Hey there! It’s our final follow-up from our end. Do you still wish to proceed? We are always here to assist you. Call us +18883470772 without any hesitation."
);
$twilio_sid = getenv("TWILIO_SID");
$twilio_token = getenv("TWILIO_TOKEN");
$client = new Client($twilio_sid, $twilio_token);
foreach ($numbers as $number) {
$client->messages->create(
$number->callerId,
//"+14356277657",
[
"from" => "+18882998227",
"body" => $contents[1]
]
);
}
return view("Dashboard.Numbers.numbers", [
"numbers" => $numbers
]);
}
So, here you can see $contents variable. There are some contents inside of an array. When Someone get the route first item of the array will work as "body" of the sms content. When someone go to the route again, 2nd item of the array will be worked as "body". Just like this the process will continue until it reaches to the last item of the array.
Is there any easy solution for me

xml reading issue coming from third party

i have created a script in php/laravel which downloads the thousands of xml files from the third party server everyday and i don't have any control over their xml files. i am extracting them, reading and inserting them into my database. one of the xml file is throwing an error.
local.ERROR: XMLReader::readOuterXml(): DRHBN.xml:17106: parser error : Couldn't find end of Start Tag commo {"exception":"[object] (ErrorException(code: 0): XMLReader::readOuterXml(): DRHBN.xml:17106: parser error : Couldn't find end of Start Tag commo at
and here is the xml line number 17106 from DRHBN.xml
<Listing><Address><commons:preference-order>1</commons:preference-order><commons:address-preference-order>1</commons:address-preference-order><commons:FullStreetAddress>6100 Goldenseal Ct. NW</commons:FullStreetAddress><commons:UnitNumber>Plan: The Oakwood</commons:UnitNumber><commons:City>Albuquerque</commons:City><commons:StateOrProvince>NM</commons:StateOrProvince><commons:PostalCode>87120</commons:PostalCode><commons:Country>US</commons:Country></Address><ListPrice commons:isgSecurityClass="Public">351990</ListPrice><ListingURL>https://listings.listhub.net/pages/DRHBN/94121-4714/?channel=visualshows</ListingURL><ProviderName>D.R. Horton Homes</ProviderName><ProviderURL>https://www.drhorton.com</ProviderURL><ProviderCategory>HomeBuilder</ProviderCategory><LeadRoutingEmail>infoabq#drhorton.com</LeadRoutingEmail><Bedrooms>3</Bedrooms><Bathrooms>2</Bathrooms><PropertyType otherDescription="Single Family">Residential</PropertyType><PropertySubType otherDescription="Single Family">Single Family Detached</PropertySubType><ListingKey>3yd-DRHBN-94121-4714</ListingKey><ListingCategory>Purchase</ListingCategory><ListingStatus>Active</ListingStatus><MarketingInformation><commons:PermitAddressOnInternet commons:isgSecurityClass="Public">true</commons:PermitAddressOnInternet><commons:VOWAddressDisplay commons:isgSecurityClass="Public">true</commons:VOWAddressDisplay><commons:VOWAutomatedValuationDisplay commons:isgSecurityClass="Public">true</commons:VOWAutomatedValuationDisplay><commons:VOWConsumerComment commons:isgSecurityClass="Public">true</commons:VOWConsumerComment></MarketingInformation><Photos><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/1?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/2?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/3?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/4?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/5?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/6?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/7?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/8?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/9?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/10?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/11?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/12?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/13?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/14?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/15?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/16?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/17?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/18?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/19?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/20?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/21?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/22?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/23?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/24?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/25?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/26?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/27?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/28?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/29?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/30?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/31?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/32?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/33?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/34?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/35?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/36?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/37?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/38?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/39?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/40?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/41?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/42?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/43?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/44?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/45?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/46?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/47?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/48?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/49?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/50?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/51?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/52?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/53?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/54?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/55?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/56?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/57?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/58?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/59?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/60?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/61?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/62?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/63?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/64?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/65?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/66?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/67?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/68?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/69?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/70?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/71?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/72?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/73?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/74?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/75?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/76?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/77?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/78?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/79?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/80?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/81?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/82?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/83?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/84?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/85?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/86?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/87?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/88?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/89?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/90?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/91?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/92?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/93?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/94?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/95?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/96?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/97?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/98?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/99?lm=20210202T110438</MediaURL></Photo><Photo><MediaModificationTimestamp commons:isgSecurityClass="Public">2021-02-02T11:04:38+00:00</MediaModificationTimestamp><MediaURL>http://photos.listhub.net/DRHBN/94121-4714/100?lm=20210202T110438</MediaURL></Photo></Photos><DiscloseAddress>true</DiscloseAddress><ListingDescription>The Oakwood is a thoughtfully designed single-story home with three bedrooms and two bathrooms. The covered entry invites guests to your home. The tech room is found off the foyer for a second living area or office. The split design has the largest bedroom separate from the secondary bedrooms. The kitchen features a corner pantry and island and looks out over the spacious great room and dining area. The largest bedroom includes both a bathtub and a walk-in shower, with a large walk-in closet as well. The covered patio is a great place to entertain or just relax in your backyard.</ListingDescription><MlsId>DRHBN</MlsId><MlsName>D.R. Horton</MlsName><MlsNumber>94121+4714</MlsNumber><LivingArea>2105</LivingArea><ListingTitle>The Oakwood</ListingTitle><FullBathrooms>2</FullBathrooms><ThreeQuarterBathrooms>0</ThreeQuarterBathrooms><HalfBathrooms>0</HalfBathrooms><OneQuarterBathrooms>0</OneQuarterBathrooms><PartialBathrooms>0</PartialBathrooms><ListingParticipants><Participant><ParticipantKey>3yd-DRHBN-94121</ParticipantKey><ParticipantId>94121</ParticipantId><FirstName>Online</FirstName><LastName>Sales Counselor</LastName><Role>Listing</Role><PrimaryContactPhone>5057501209</PrimaryContactPhone><Email>infoabq#drhorton.com</Email><WebsiteURL>https://www.drhorton.com/new-mexico/albuquerque/albuquerque/la-cuentista.aspx</WebsiteURL></Participant></ListingParticipants><Offices><Office><OfficeKey>3yd-DRHBN-940</OfficeKey><OfficeId>940</OfficeId><OfficeCode><OfficeCodeId>940</OfficeCodeId></OfficeCode><Name>D.R. Horton - Albuquerque</Name><CorporateName>D.R. Horton - Albuquerque</CorporateName><BrokerId>divisions</BrokerId><Address><commons:preference-order>1</commons:preference-order><commons:address-preference-order>1</commons:address-preference-order><commons:FullStreetAddress>6100 Goldenseal Ct. NW</commons:FullStreetAddress><commons:City>Albuquerque</commons:City><commons:StateOrProvince>NM</commons:StateOrProvince><commons:PostalCode>87120</commons:PostalCode><commons:Country>US</commons:Country></Address><Website>https://www.drhorton.com</Website></Office></Offices><Brokerage><Name>D.R. Horton Homes</Name></Brokerage><Builder><Name>D.R. Horton - Albuquerque</Name><WebsiteURL>https://www.drhorton.com</WebsiteURL></Builder><Location><Latitude>35.17669</Latitude><Longitude>-106.7101</Longitude><Community><commons:Subdivision commons:isgSecurityClass="Public">La Cuentista</commons:Subdivision><commons:Schools><commons:School><commons:Name>Sunset View Elementary School</commons:Name><commons:SchoolCategory>Elementary</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School><commons:School><commons:Name>Volcano Vista High School</commons:Name><commons:SchoolCategory>High</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School><commons:School><commons:SchoolCategory>JuniorHigh</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School><commons:School><commons:Name>Tony Hillerman Middle School</commons:Name><commons:SchoolCategory>Middle</commons:SchoolCategory><commons:District commons:isgSecurityClass="Public">Albuquerque Public Schools</commons:District></commons:School></commons:Schools></Community><Neighborhoods><Neighborhood><Name>La Cuentista</Name><Description>La Cuentista is the Westsides hottest community! Offering D.R Hortons most popular single-story floor plans from 1,746 to 2,482 square feet with views of the Sandia and city lights. Homes start in the low-$300,000s and offer the most popular, in-demand options like the Multi-Gen floor plan, 9 ceilings with 8 doors, hard tile living rooms and covered patios standard. Located on the Northwest side of Albuquerque, only minutes from I-40, Montano, Coors and Paseo Del Norte. Perfect location for commuting to Downtown or Northeast AlbuquerqueThe La Cuentista community is just a short distance away from Volcano Vista High School and has a variety of shopping centers nearby. Due to it's location near the edge of Albuquerque, there are many recreational activities that are easily accessible such as the Petroglyph National Park. Give us a call and schedule a tour of your dream home!When you choose Americas Builder to construct your home, you select the features and location that work best for you. Below is a list of reasons why its a smart idea to choose the largest home builder in the nation: The benefits of high quality, new home construction include the most advanced technology, energy efficiencies and building standards. A robust new home warranty provides buyers peace of mind. New houses typically dont require the upgrades and maintenance needed in pre-owned homes before moving in or during the initial years of ownership.</Description></Neighborhood></Neighborhoods></Location><DetailedCharacteristics><ArchitectureStyle otherDescription="">Other</ArchitectureStyle><IsNewConstruction>true</IsNewConstruction><NumFloors>1.0</NumFloors><NumParkingSpaces>2</NumParkingSpaces><RoofTypes><RoofType>Unknown</RoofType></RoofTypes><Rooms><Room>Bedroom</Room><Room>Bedroom</Room><Room>Bedroom</Room><Room>Full Bath</Room><Room>Full Bath</Room></Rooms></DetailedCharacteristics><ModificationTimestamp commons:isgSecurityClass="Public">2021-02-06T21:31:14+00:00</ModificationTimestamp><Disclaimer commons:isgSecurityClass="Public">Copyright © 2021 D.R. Horton. All rights reserved. All information provided by the listing agent/broker is deemed reliable but is not guaranteed and should be independently verified.</Disclaimer></Listing>
how do i get any ride of this invalid xml issue?

Switching to GetSingleItem instead of findItemsAdvanced with the ebay-api

I am using the ebay-api's to pull out listing information using the itemId the user enters to import the current live auction on ebay into my site. I have been using the FindItemsAdvanced which is pretty straight forward grabbing the information using the SingleXMLElement
$itemid = (string) $xml->searchResult->item->itemId;
$shipcost = (string) $xml->searchResult->item->shippingInfo->shippingServiceCost;
I dont really need to use the FindItemsAdvanced because some information is missing, ie: quantity of a item listed.
I have looked at the documentation for GetSingleItem and it doesnt have a searchResult member, my question is, how is the above done with GetSingleItem to get the details.
This is the process i used but cant grab any details
url2 is - http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=myIdApp&siteid=0&version=967&ItemID=192401461174&IncludeSelector=Details
then the contents
$resp2 = file_get_contents($url2);
then the xml object
$xml2 = new SimpleXMLElement($resp2);
At this stage i have my object but i cant extract any details like a can with FindItemsAdvanced
Thanks to the comments i'm adding more information, the file_get_contents only gives me this
2017-12-24T12:33:55.736Z Success E1033_CORE_APILW_18542200_R1 1033 false 192401461174 2018-01-17T10:29:17.000Z 2017-12-18T10:29:17.000Z http://www.ebay.com/itm/Aspire-CF-SUB-OHM-Mod-Battery-Ecig-Vape-Kit-Carbon-Fibre-Aspire-k3-Samsung-25r-/192401461174 FixedPriceItem wigan, Lancashire PayPal http://thumbs3.ebaystatic.com/pict/1924014611748080_1.jpg https://i.ebayimg.com/00/s/NTQ1WDczMQ==/z/6PkAAOSwttFaD~0~/$_1.PNG?set_id=8800005007 https://i.ebayimg.com/00/s/NzIwWDI5MA==/z/kccAAOSwtGlZCa0C/$_1.JPG?set_id=880000500F https://i.ebayimg.com/00/s/OTAyWDYwMA==/z/Gk8AAOSw42JZCa0D/$_1.JPG?set_id=880000500F https://i.ebayimg.com/00/s/Nzg3WDExODE=/z/eNkAAOSwQcJaBAo8/$_1.JPG?set_id=880000500F https://i.ebayimg.com/00/s/OTAwWDkwMA==/z/zQgAAOSwyP5aD~1K/$_1.JPG?set_id=8800005007 https://i.ebayimg.com/00/s/NTAwWDUwMA==/z/6RIAAOSwttFaD~1L/$_1.PNG?set_id=8800005007 wn69jt 183498 Health & Beauty:E Cigarettes, Vapes & Accs:E Cigarettes, Vapes & Mods 5 improveyourlife Purple 525 100.0 0 31.94 23.9 Active 0 Worldwide UK P23DT21H55M22S 184 26395:183497:183498 GB 14 days Returns Accepted Only if broken Buyer false false 0 1000 New false 0 false true true
I understand i need to get the xml into a string to use namespaces but i'm not sure how to do that. The crazy thing is, the only thing i need out of GetSingleItem is the quantity because FindItemsAdvanced does not have it.
Try using $xml2 = simplexml_load_string($resp2); and then you should be able to get the information needed normally, with $quantity = $xml2->Item->Quantity;.
As a tip, I highly recommend you give a try to this SDK. I am using it for a long time, to manage multiple shops and it's extremely helpful. Saved me a huge amount of time. The guy who created it also made a ton of examples. You could have a look at those before using the SDK, and you'll see how much simpler everything is.

postman chrome shows 404 error on calling of wordpress url from .net

In a project, I have to show wp posts in website via .net. So, I created a php file in project root folder as 'latestnews.php'. When called from browser, everything is working fine and data is shown. But in postman though the data is shown status is coming as 404 not found.
How to solve this issue? Any help/suggestions are welcome. Url: http://109.74.4.178/worldwaterweek/latestnews.php?numberposts=5
latestnews.php
<?php
define('WP_USE_THEMES', false);
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
$num = $_GET["numberposts"] ?: '10';
$posts = get_posts(array(
'posts_per_page' => $num,
));
$array = array();
foreach($posts as $val) {
start_wp();
$array[] = array(
'id' => $val->ID,
'title' => $val->post_title,
'link' => get_permalink($val->ID),
'publish_date' => $val->post_date,
'content' => strip_tags($val->post_content),
'image' => get_the_post_thumbnail_url($val->ID, 'full')
);
}
echo json_encode($array);
?>
It is working fine and I am getting below data:
[{"id":2446,"title":"Scientific Programme Committee (SPC)","link":"http://109.74.4.178/worldwaterweek/scientific-programme-committee-spc/","publish_date":"2017-02-11 10:23:39","content":"[vc_row][vc_column width=\"1/2\"][vc_column_text]\r\n\r\nThe Scientific Programme Committee (SPC) is comprised of a number of professors, scientists and experts from the water and development fields. The work of the SPC involves setting the overall theme and scope for World Water Week in Stockholm.\r\n\r\n[/vc_column_text][vc_column_text]\r\n\r\nThe committee also determines the seminars topics, selects from submitted abstracts and develops the seminars programmes.\u00a0 It is aided in its work by the Young Scientific Programme Committee.\r\n\r\n[/vc_column_text][/vc_column][vc_column width=\"1/2\"][vc_column_text]2017 SPC\r\n\r\n \tProf. Torkil J\u00f8nch Clausen, DHI (Chair)\r\n \tMs. Danka Thalmeinerova, GWP\r\n \tDr. Marianne Kjell\u00e9n, UNDP\r\n \tDr. Phil Graham, SMHI & BTC\r\n \tMs. Renee Andersson, Sustainability Consultant\r\n \tDr. Louise Karlberg, SEI\r\n\r\n(swipe to the next slide to continue)[/vc_column_text][/vc_column][/vc_row]","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2015/11/Open-for-Submissions-WWW-2017.jpg"},{"id":8907,"title":"2017 SPC members (continued)","link":"http://109.74.4.178/worldwaterweek/2017-spc-members/","publish_date":"2017-02-11 10:21:21","content":"[vc_row][vc_column width=\"1/2\"][vc_column_text](continued 2017 SPC members list)\r\n\r\n \tDr. Robert Bos, IWA\r\n \tMr. Will Sarni, Deloitte\r\n \tProf. Kalanithy Vairavamoorthy, IWMI\r\n \tMr. Gyewoon Choi, Incheon National University\r\n \tMs. Eiman Karar, UNEP\r\n \tDr. Guillermo Donoso Harris, Universiad Pontificia\r\n \tDr. Diego Rodr\u00edguez, The World Bank Group\r\n\r\n[/vc_column_text][/vc_column][vc_column width=\"1/2\"][vc_column_text]\r\n\r\n \tDr. Dipak Gyawali, Nepal Academy of Science and Technology\r\n \tMr. Jon Lane, Water and Sanitation Consultant\r\n \tMr. Rami AbdelRahman, SIWI\r\n \tMs. Pritha Hariram, IWA (co-opted member)\r\n \tMr. Victor Arroyo, CAF (co-opted member)\r\n \tDr. Pay Drechsel, IWMI (co-opted member)\r\n \tMr. Torgny Holmgren, SIWI (Vice Chair)\r\n \tMs. Karin Lex\u00e9n, SIWI\r\n \tMr. Adrian Puigarnau, SIWI (Secretary)\r\n\r\n[/vc_column_text][/vc_column][/vc_row]","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2016/09/Closing-Plenary-2016-3.jpg"},{"id":855,"title":"Young Scientific Programme Committee (YPSC)","link":"http://109.74.4.178/worldwaterweek/young-scientific-programme-committee-2/","publish_date":"2017-02-10 12:10:43","content":"[vc_row][vc_column width=\"1/2\"][vc_column_text]2017 Young Scientific Programme Committee\r\n\r\n \tShubhra Bhattacharjee, Bangladesh\r\n \tMadison Condon, USA\r\n \tDavid Ginting, Indonesia\r\n \tRianna Gonzales, Trinidad and Tobago\r\n\r\n[/vc_column_text][/vc_column][vc_column width=\"1/2\"][vc_column_text]\r\n\r\n \tKanokphan Jongjarb, Thailand\r\n \tMarielle Larson, USA\r\n \tSofia Murad, USA\r\n \tMatthijs Wessels, Holland\r\n \tMarij Zwart, The Netherlands\r\n\r\n[/vc_column_text][/vc_column][/vc_row]","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2016/11/OC-slider-iStock_000047541008.png"},{"id":4487,"title":"Shubhra Bhattacharjee","link":"http://109.74.4.178/worldwaterweek/shubhra-bhattacharjee/","publish_date":"2017-02-10 11:46:49","content":"Shubhra Bhattacharjee is a trained and experienced sustainability professional with a track record of managing complex projects and developing innovative solutions in response to the sustainability challenges faced by business and, in turn, society today. Shubhra joins Solidaridad after an extensive spell of working on the brand side of the sector, with experience working in environmental and social compliances at Lidl HK Ltd., Target Australia and Li & Fung Bangladesh. He audited a number of factories of textile, leather and ceramic sectors. Besides that, a number of training materials on environmental issues was developed by him for factories. He also possesses experience as an environmental manager at a large textile industry. Shubhra holds Bachelor & Master\u2019s degree in Environmental Sciences with concentration in wastewater treatment and public health from Jahangirnagar University, Bangladesh. Shubhra\u2019s interest lies on development of cost effective wastewater treatment and improve water conservation. Shubhra has over 6 years of experience in water and wastewater resource management, treatment, and water conservation.\r\n\r\nShubhra specializes on water quality assessment, wastewater treatment and groundwater governance.","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2017/02/shubhra-bhattacharjee.png"},{"id":4485,"title":"Madison Condon","link":"http://109.74.4.178/worldwaterweek/madison-condon/","publish_date":"2017-02-10 11:44:57","content":"Madison Condon is an Earth Institute Postdoctoral Research Fellow at Columbia University where she works in collaboration with the Columbia Water Center and Columbia Law School. She received her J.D. from Harvard University and her Masters in Law and Diplomacy from The Fletcher School at Tufts University. As a Fulbright Fellow based in the Netherlands, she researched the impact of foreign investment on customary water rights in rural Tanzania. Prior to joining the Earth Institute, Madison clerked for Judge Jane Kelly of the Court of Appeals for the Eighth Circuit. She received a B.S. in Environmental Engineering from Columbia University.\r\n\r\nMadison\u2019s research focuses on environmental law, land and water rights, and international trade and investment law. With the Columbia Water Center and the Columbia Center for Sustainable Investment she is engaged with a three-year project to understand water-related risks in the international mining industry. She also works on a UNESCO-funded project investigating mines the environmental liabilities of state owned mining companies in East Africa.","image":"http://109.74.4.178/worldwaterweek/wp-content/uploads/2017/02/madison-condon.png"}]
Found the solution.
Instead of loading wp-blog-header.php which in turn loads wp-load.php(loads wp library) and template-loader.php(loads wp templates), I added wp-load.php only.
So, I guess wp template was creating the errors.

Scraping HN Front Page - Handeling Simple HTML Dom Error

I'm using 'Simple HTML Dom' to scrape the HN Front Page (news.ycombinator.com), which works great most of the time.
However, every now and then they promote a job/company that lacks the elements that the scraper is looking for, i.e. score, username and number of comments.
This of course, breaks the array and thus the output of my script:
<?php
// 2012-02-12 Maximilian (Extract news.ycombinator.com's Front Page)
// Set the header during development
//header ("content-type: text/xml");
// Call the external PHP Simple HTML DOM Parser (http://simplehtmldom.sourceforge.net/manual.htm)
include('lib/simple_html_dom.php');
date_default_timezone_set('Europe/Berlin');
// Download 'news.ycombinator.com' content
//$tmp = file_get_contents('http://news.ycombinator.com');
//file_put_contents('get.tmp', $tmp);
// Retrieve the content
$html = file_get_html('tc.tmp');
// Set the extraction pattern for each item
$title = $html->find("tr td table tr td.title a");
$score = $html->find("tr td.subtext span");
$user = $html->find("tr td.subtext a[href^=user]");
$link = $html->find("tr td table tr td.title a");
$time = $html->find("tr td.subtext");
$additionals = $html->find("tr td.subtext a[href^=item?id]");
// Construct the feed by looping through the items
for($i=0;$i<29;$i++) {
$cr=1;
// Check if the item points to an external website
if (!strstr($link[$i]->href,'http')) {
$url = 'http://news.ycombinator.com/'.$link[$i]->href;
$description = "Join the discussion on Hacker News.";
} else {
$url = $link[$i]->href;
// Getting content here
if (empty($abstract)) {
$description ="Failed to load any relevant content. Please try again later.";
} else {
$description = $abstract;
}
}
// Put all the items together
$result .= '<item><id>f'.$i.'</id><title>'.htmlspecialchars(trim($title[$i]->plaintext)).'</title><description><![CDATA['.$description.']]></description><pubDate>'.str_replace(' | '.$additionals[$i]->plaintext,'',str_replace($score[$i]->plaintext.' by '.$user[$i]->plaintext.' ','',$time[$i]->plaintext)).'</pubDate><score>'.$score[$i]->plaintext.'</score><user>'.$user[$i]->plaintext.'</user><comments>'.$additionals[$i]->plaintext.'</comments><id>'.substr($additionals[$i]->href,8).'</id><discussion>http://news.ycombinator.com/'.$additionals[$i]->href.'</discussion><link>'.htmlspecialchars($url).'</link></item>';
}
$output = '<rss><channel><id>news.ycombinator.com Frontpage</id><buildDate>'.date('Y-m-d H:i:s').'</buildDate>'.$result.'</channel></rss>';
file_put_contents('tc.xml', $output);
?>
Here's an example of the correct output
<item>
<id>f0</id>
<title>Show HN: Bootswatch, free swatches for your Bootstrap site</title>
<description><![CDATA[Easy to Install Simply download the CSS file from the swatch of your choice and replace the one in Bootstrap. No messing around with hex values. Whole New Feel We've all been there with the black bar and blue buttons. See how a splash of color and typography can transform the feel of your site. Modular Changes are contained in just two LESS files, enabling modification and ensuring forward compatibility.]]></description>
<pubDate>3 hours ago</pubDate>
<score>196 points</score>
<user>parkov</user>
<comments>30 comments</comments>
<id>3594540</id>
<discussion>http://news.ycombinator.com/item?id=3594540</discussion>
<link>http://bootswatch.com</link>
</item>
<item>
<id>f1</id>
<title>Louis CK inspires Jim Gaffigan to sell comedy special for $5 online</title>
<description><![CDATA[Dear Internet Friends,Inspired by the brilliant Louis CK, I have decided to debut my all-new hour stand-up special on my website, Jimgaffigan.com.Beginning sometime in April, “Jim Gaffigan: Mr. Universe” will be available exclusively for download for only $5. A dollar from each download will go directly to The Bob Woodruff Foundation; a charity dedicated to serving injured Veterans and their families.I am confident that the low price of my new comedy special and the fact that 20% of each $5 download will be donated to this very noble cause will prevent people from stealing it. Maybe I’m being naïve, but I trust you guys.]]></description>
<pubDate>57 minutes ago</pubDate>
<score>25 points</score>
<user>rkudeshi</user>
<comments>4 comments</comments>
<id>3595285</id>
<discussion>http://news.ycombinator.com/item?id=3595285</discussion>
<link>http://www.whosay.com/jimgaffigan/content/218011</link>
</item>
And here's an example of incorrect output. Note that the elements are not empty, thus I cannot seem to catch the error and simply jump to the next item. Everything past the promotion post will break:
<item>
<id>f14</id>
<title>Build the next Legos: We're hiring an iOS Developer & Web Developer (YC S11)</title>
<description><![CDATA[Interested in building the next generation of toys on digital devices such as the iPad? That’s what we’re doing here at Launchpad Toys with apps like Toontastic (Named one of the “Top 10 iPad Apps of 2011” by the New York Times and was recently added to the iTunes Hall of Fame) and an awesom]]><![CDATA[e suite of others we have under development. We’re looking for creative and playful coders that have made games or highly visual apps/sites in the past for our two open development positions. As a kid, you probably played with Legos endlessly and grew up to be a hacker because you still love building things. Sounds like you? Email us at howdy#launchpadtoys.com with a couple links to some projects and code that we can look at along with your resume.]]></description>
<pubDate>2 hours ago</pubDate>
<score>14 points</score>
<user>bproper</user>
<comments>7 comments</comments>
<id>3594944</id>
<discussion>http://news.ycombinator.com/item?id=3594944</discussion>
<link>http://launchpadtoys.com/blog/2012/02/iosdeveloper-webdeveloper/</link>
</item>
<item>
<id>f15</id>
<title>SOPA foe Fred Wilson supports a blacklist on pirate sites</title>
<description><![CDATA[VC Fred Wilson says Google, Bing, Facebook, and Twitter should warn people when they try to log in at known pirate sites: "We don't need legislation." Fred Wilson says: If they try to pass antipiracy legislation, it will once again be 'war.' (Credit: Greg Sandoval/CNET) Fred Wilson, a well-known ven]]><![CDATA[ture capitalist from New York, says he's in favor of creating a blacklist for Web sites found to traffic in pirated films, music, and other intellectual property. The co-founder of Union Square Ventures told a gathering of media executives at the Paley Center for Media yesterday that he believes a good antipiracy measure would be for Google, Twitter, Facebook, and other major sites to issue warnings to people when they try to connect with a known pirate site. Fred Wilson, a co-founder of Union Square Ventures, says 'Our children have been taught to steal.' (Credit: Union Square Ventures) Wilson favors establishing an independent group to create a "black and white list." "The blacklist are those sites we all know are bad news," he told the audience in New York.]]></description>
<pubDate>14 points by bproper 2 hours ago | 7 comments</pubDate>
<score>24 points</score>
<user>andrewcross</user>
<comments>12 comments</comments>
<id>3594558</id>
<discussion>http://news.ycombinator.com/item?id=3594558</discussion>
<link>http://news.cnet.com/8301-31001_3-57377862-261/post-sopa-influential-tech-investor-favors-blacklisting-pirate-sites/</link>
</item>
So here's my question: How can I handle a situation where a particular element is missing and find() doesn't throw an error? Do I have to start from scratch, or is there a better approach in scraping the HN front page?
For anyone curious, here's the whole XML file: http://thequeue.org/api/tc.xml
You have to work by chunks in order to handle that, there seems to be a dummy spacer element that can help you with that:
$news = preg_split('/<tr style="height:5px"><\/tr>/',$html->find('tbody',2)->innertext);
And then use subselectors:
foreach($news as $article){
$article = str_get_html($article)
// No upvote arrow found so its not a valid article
if(count($article->find('img')) === 0){
continue;
}
}
And for the other elements you use the same selectors
We'll thanks to Ivan's trail of thought, I am now splitting the initially scraped HTML into an array, each node representing a post. Then, going through every single post in a loop, I'll check if the up voting arrow image exists. If not, I'll not add it to the result. In the end everything will be stitched back together and the sponsored post is left out. Here's the code:
$array = explode('<tr style="height:5px"></tr>',$html);
foreach ($array as $post) {
if (!strstr($post,'grayarrow.gif')){}else{
$clean .= $post;
}
}
unset($array);
$html = str_get_html($clean.'</body></html>');

Categories