Getting data from wordpress-site

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Getting data from wordpress-site

Postby Zood » Wed May 17, 2017 6:28 pm

Hey!

So a couple weeks ago I started on a new project, creating a professional agenda for restaurants to handle their reservations.
So far so good! Now i am getting a request to implement reservations made on their website (all Wordpress-websites).
Any tips on how to handle this?
I have never worked with Wordpress before..

Thanks in advance!
Zood
Zood
 
Posts: 10
Joined: Mon Apr 24, 2017 7:17 pm

Re: Getting data from wordpress-site

Postby ClipArtGuy » Wed May 17, 2017 6:52 pm

There is an open source Wordpess library Here: https://github.com/digitalpomegranate/l ... wp-restapi
and a webinar about it here: https://youtu.be/D_6b04AltTQ
ClipArtGuy
 
Posts: 79
Joined: Wed Aug 19, 2015 4:29 pm

Re: Getting data from wordpress-site

Postby ghettocottage » Fri May 19, 2017 4:14 pm

edit: after re-reading your original post I realized you might mean that there is already a reservation system set up on the website, and they want you to pull data from that to your application you are building.

If that is the case, do you know if they are using a custom-built thing on the site, or is it a plugin? If it is a plugin, what is the name of it?

my original reply is below, but I was thinking along the lines of building something from scratch so people could make reservations on the Wordpress website.

################

It depends on how you want to implement the reservation system. It does not necessarily have to be part of the core Wordpress structure. It is possible to add your own tables to a wordpress database, and pull that data into webpages using something like this (for example):

<?php
global $wpdb;
$customers = $wpdb->get_results("SELECT * FROM customers;");
print_r($customers);
?>

Here is a basic rundown: http://www.makeuseof.com/tag/working-cu ... wordpress/

This approach might work better for you if you already have your data structure built and do not want to re-create it to fit into core Wordpress tables. It also has the advantage of being future-proof against major Wordpress upgrades that might break your app (I had this happen once with a Joomla website and custom application...was quite a pain to have to go back and pick through all the changes)


Having said all that...you can also build with core Wordpress structure. They have a nice API and tons of documentation. I have done some interesting things using Custom Post Types in Wordpress, but I prefer to keep my complex apps separate and just pull any data I need into Wordpress using $wpdb->get_results
ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
 
Posts: 211
Joined: Tue Apr 10, 2012 9:18 am


Return to Internet

Who is online

Users browsing this forum: No registered users and 2 guests

cron