The client class is used to connect to Group-Office and get's the year report data which they can use to display.
Because this might be useful to others I've written this tiny blog post:
<?php class Client { private $host; private $curl; public function __construct($host, $username, $password) { $this->curl = curl_init(); $this->host = rtrim($host, '/'); curl_setopt($this->curl, CURLOPT_USERPWD, $username . ":" . $password); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, TRUE); } public function request($route, array $data = array()) { curl_setopt($this->curl, CURLOPT_URL, $this->host . '/index.php?r=' . $route); curl_setopt($this->curl, CURLOPT_POST, 1); curl_setopt($this->curl, CURLOPT_POSTFIELDS, http_build_query($data)); $json = curl_exec($this->curl); return json_decode($json); } public function __destruct() { curl_close($this->curl); } } $client = new Client('https://example.group-office.com', 'apiuser', 'SECRET'); $data = $client->request('billing/report/yearReport', array( 'start_date' => '01-01-2017', 'end_date' => '31-12-2017', 'books' => json_encode(array('2')) ) ); var_dump($data);
Nice blog with Amazing information .. love to read about this.
ReplyDeleteAwaiting for your new post
We at Fullassignment.com bring to you the most significant Case Study help writing service at the best cost. With long stretches of understanding we are prepared to give assignment help over the globe.You will be guided here with a portion of the information of Marketing assignment which could assist you in deciding writing a Marketing assignment. Nonetheless, we unequivocally prescribe you to benefit Civil Law Case Study Assignment Help from our specialist to find out about marketing and its scope.We also provide /Mathematics Assignment Help from our experts.
https://fullassignment.com/
Nice blog with Amazing information .. love to read about this.
ReplyDeleteAwaiting for your new post
Garrett Mitchell Jersey
Garrett Crochet Jersey
Daniel Cabrera Jersey
WOW..!! This is really an amazing work, https://hyfytvapk.com/hyfytv-for-pc/
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteYou should opt for Assignment Help services if you want to save your time. For more details on academic writing services, you have to browse the website of the service provider and grab all information about assignment writing help in Qatar.
ReplyDeleteNice blog and great topic you choose. I am really impressed by your content and headings which you used in your blog. Same as you, I am also here for advertising for my Outlook web-page. When we use Outlook email then we face several things that we do not know at the time of installation, and these things can make differences. So I am here to light-up some useful and technical things about the Outlook email application. To know about the Outlook, you should visit our Outlook Customer Service web-page. For the separate technical help of the printer, click our web-links.
ReplyDeleteOutlook Support Phone Number
Outlook Customer Service Number
Outlook Tech Support Number
Is there a phone number for Outlook support?
How do I contact outlook Support?
How do I contact outlook by phone?
And we also provide information and help for printer from our HP Printer Support and HP Support web-page.
Thank You.
Great post and I got extremely information from your article. I appreciate your work and requesting you to please keep posting other articles. and like you, I am also here to provide information about suddenlink login service. So if you need and if you want to get information about any email problems then click and visit the given links. Remember we are here for independent help and using product names for the referent only.
ReplyDeletesuddenlink email login
suddenlink.net login
Legitimate custom nursing writing services are not hard to come across for those in need of Affordable Nursing Writing Services and nursing research writing services.
ReplyDeleteThanks for this script we are using it for our paper help services and found excellently working. Keep sharing more solutions like this.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWhen I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get
ReplyDeletefour emails with the same comment. Is there any way you can remove me from that service?
Thanks!
Primary School Tutor
I can give you the address Here you will learn how to do it correctly. Read and write something good.
ReplyDeleteSPSS Help