Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Christoph Rumpel:
Build a newsletter chatbot in PHP - Part 3
Mar 27, 2018 @ 15:57:24

Christoph Rumpel has continued his series covering the creation of a chatbot using the Botman package in a new post to his site. The latest post, part three in the series, builds on the base created in parts one and two and integrates the bot with his project website.

In part one and two we created a Facebook Messenger chatbot that let your users subscribe to your newsletter. We stored that information in the database and sent out our first newsletter. In the last third part, we integrate this bot to a website and write our first tests.

He then walks you through the process of using the Facebook Customer Chat Plugin to integrate it into the site (using the Facebook JavaScript SDK). He includes instructions on whitelisting your domain and including the plugin into the site's source using a few custom configuration options. With the integration complete he then takes a step back and shows the creation of several tests evaluating the fallback handling and subscription conversation responses.

tagged: chatbot tutorial series part3 integrate facebook testing fallback subscribe

Link: https://christoph-rumpel.com/2018/03/build-a-newsletter-chatbot-in-php-part-3

php[architect]:
Book Release: Integrating Web Services with OAuth and PHP
Feb 25, 2016 @ 20:08:17

php|architect has officially announced the release of their latest book: Integrating Web Services with OAuth and PHP from author and PHP community member Matt Frost.

Modern web applications are no longer standalone, monolithic codebases. Instead, they are expected to integrate with external, 3rd party applications to allow users to tap into new features, integrate with their social networks, and to easily migrate their data between systems. Many services afford these integrations by building web services that use the OAuth standard to authenticate users and allow “secure delegated access” on their behalf.

The book covers both of the major versions of OAuth currently in use (v1 and v2), how they differ and provides working PHP examples of both the client and server sides of the functionality. If you're interested you can "try before you buy" with an excerpt from the book to get a feel for the writing style and content. You can get more information and pick up a copy of your own directly from the php[architect] site.

tagged: server oauth webservice integrate release book client mattfrost

Link: https://www.phparch.com/books/integrating-web-services-with-oauth-and-php/

SitePoint PHP Blog:
Install and Integrate Elasticsearch with Drupal
Apr 10, 2015 @ 15:37:55

The SitePoint PHP blog has a recent tutorial posted showing you how to integrate Drupal and Elasticsearch to make for more effective searching of your content. This is the second part of this series.

In this tutorial I am going to look at the possibility of using Drupal 7 as a content management system that powers another high performance application. To illustrate the latter, I will use the Silex PHP microframework and Elasticsearch as the data source. The goal is to create a proof of concept, demonstrating using these three technologies together. [...] The tutorial will be split into two pieces, because there is quite a lot of ground to cover. In this part, we’ll set up Elasticsearch on the server and integrate it with Drupal by creating a small, custom module that will insert, update, and delete Drupal nodes into Elasticsearch.

They assume you already have an Elasticsearch install set up and ready to go but do offer some suggestions on how to configure it to be a little bit more secure. Then, in your Drupal application (again, already installed) they show you how to use the Elasticsearch module to connect to the ES instance and, once connected, insert, update and delete data for the data in your nodes.

tagged: tutorial elasticsearch drupal integrate node storage

Link: http://www.sitepoint.com/install-integrate-elasticsearch-drupal/

Hari KT:
Zend Feed and Guzzle
Apr 02, 2015 @ 15:43:06

Hari KT has posted some of the results of his work integrating the Guzzle client into the Zend Feed component for use in handling it's HTTP requests and responses.

You may have worked with Zend Feed as a standalone component. I don’t know whether you have integrated Zend framework Feed with Guzzle as Http Client. This post is inspired by Matthew Weier O’Phinney, who have mentioned the same on github.

He starts with the contents of his composer.json configuration file, pulling in Guzzle, ZendFeed and ZendService, and explaining the need for each. He then makes a simple "GuzzleClient" class and "GuzzleResponse" class that fit with the needed interfaces used by ZendFeed. Then he "wires them up" and injects the custom client and responses classes into the ZendFeed instance.

tagged: zendfeed component guzzle integrate http client interface tutorial

Link: http://harikt.com/blog/2015/04/01/zend-feed-and-guzzle/

JetBrains Blog:
Laravel Development using PhpStorm
Jan 21, 2015 @ 15:03:16

The JetBrains blog has posted about an update to their popular PHPStorm IDE tool. In this new post they talk about the next level of integration they've introduced for those developing Laravel-based applications.

Last summer, we introduced support for Blade, the template language used by Laravel. Support for artisan, the command line tool for Laravel developers, is baked into PhpStorm as well. Using the Laravel plugin and the Laravel IDE helper, we can further extend PhpStorm's support for Laravel applications.

They walk you through each of these two new updates, showing what kind of features they enable and some screenshots of the interface in use. For more information and to check out other features in this new plugin/helper setup, see this documentation page.

tagged: development phpstorm laravel plugin helper integrate

Link: http://blog.jetbrains.com/phpstorm/2015/01/laravel-development-using-phpstorm/

SitePoint PHP Blog:
AngularJS in Drupal Apps
Dec 16, 2014 @ 18:23:31

On the SitePoint PHP blog there's a new tutorial posted (by Daniel Sipos) about combining Drupal and AngularJS to make for more front-end focused, responsive applications.

Angular.js is the hot new thing right now for designing applications in the client. Well, it’s not so new anymore but is sure as hell still hot, especially now that it’s being used and backed by Google. It takes the idea of a JavaScript framework to a whole new level and provides a great basis for developing rich and dynamic apps that can run in the browser or as hybrid mobile apps. In this article I am going to show you a neat little way of using some of its magic within a Drupal 7 site. A simple piece of functionality but one that is enough to demonstrate how powerful Angular.js is and the potential use cases even within heavy server-side PHP frameworks such as Drupal.

He walks you through the creation of a simple addition of a block that lists out the titles of some other nodes. You'll need an existing Drupal installation to follow along (no setup instructions here) as well as an Angular structure for a small application. He starts with the module configuration and creates custom handling to return the JSON result back to the waiting JS connection. Then he creates the custom template and block that the AngularJS will output the results too. Finally, with that rendering, he glues them both together in an Angular controller that loads the results when an "Open" button is clicked.

tagged: angularjs tutorial drupal integrate introduction

Link: http://www.sitepoint.com/angularjs-drupal-apps/

KodeInfo.com:
Pay with Bitcoin using Coinbase and Bitpay
Dec 11, 2014 @ 16:29:09

On KodeInfo.com there's a new tutorial posted showing you how to let your users pay with Bitcoin made possible using Coinbase, a Bitcoin wallet service, and BitPay, a payment gateway. Their example is a Laravel-based application.

Today we will learn how to integrate payment with bitcoins , we will integrate coinbase and bitpay to pay with bitcoins .

They walk you through the full process, including getting the accounts set up on the needed services:

  • Setting up Bitpay
  • Setting up Coinbase
  • Creating migrations
  • Views and Routes
  • Config File
  • Creating models
  • Integrating Bitpay
  • Integrating Coinbase

Each step is accompanied by screenshots or code, depending on what steps are needed. If you want to jump to the end, you can also grab the full code directly from GitHub.

tagged: bitcoin coinbase laravel payment gateway tutorial integrate bitpay

Link: http://kodeinfo.com/post/pay-with-bitcoin-using-coinbase-and-bitpay

SitePoint PHP Blog:
7 CRM Options Compatible with Drupal
Dec 11, 2014 @ 15:14:14

The SitePoint PHP blog has posted a list of seven customer relationship management tools (CRM) that play nice with Drupal, a popular PHP-driven content management system.

Whether you want to call Drupal a CMS (Content Management System), a CMF (Content Management Framework) or a CMSomething, the ‘C’ always stands for Content. Content is where Drupal shines and is what it’s designed for. [...] When an organisation is at a stage and mindset that they also want to manage their contacts and interactions effectively they will often need tools designed specifically for that function. These are generally referred to as a CRM, which stands for Client Relationship Manager or Constituent Relationship Manager, depending on the sector (For-Profit or Not-for-Profit respectively)

[...] What has a CRM got to do with Drupal? Nothing directly, but indirectly if you’re looking to streamline your business operations and automate the ways people can interact with you, your CRM will need to work well with your website. [...] In this article, we will look at several of the big players in the CRM space that work well with Drupal, how they integrate or how developers can get them to integrate.

They start with a list of five of the seven options:

  • Roll it yourself
  • RedHen
  • CiviCRM
  • Salesforce
  • Sugar CRM

They also provide a few other options combining a few technologies: Microsoft Dynamics and BlackBaud or Nation Builder and Salsa. Links and a brief summary of the project are included for each item in the list. He ends with a few tips about the actual integration, including the use of the CRM tool's API or using the Migrate Drupal module.

tagged: crm customer relation management tool integrate drupal content

Link: http://www.sitepoint.com/7-crm-options-compatible-drupal/

Piotr Pasich:
CakePHP with Symfony’s2 router
Aug 13, 2014 @ 14:46:27

Piotr Pasich has a new post to his site today showing you how you can use the Symfony2 router with CakePHP, another popular PHP framework. He talks about some of his own experiences using CakePHP and how one module "left a bitter aftertaste" when using it - the route handling.

The second version of CakePhp still has a lot old-fashioned patterns, singletons or lack of tests, but I can live with that. I saw a lot of better or worse frameworks in my life.

He goes through an example of the CakePHP routing including some sample code and a walk-through of the code that actually handles the request. He points out some of the "clean code" violations it makes and gets started integrating the Symfony2 router instead. He extends the CakePHP router and uses this plugin to bridge between the two. He then can call the Symfony router with only slight modifications to things like the "getPath" calls.

tagged: cakephp symfony2 router integrate plugin tutorial

Link: http://piotrpasich.com/cakephp-with-symfonys2-router/

Inviqa techPortal:
Manage Project Dependencies with Bower and Composer
Jan 30, 2014 @ 18:20:40

On the Inviqa techPortal there's a new tutorial showing you how to manage your dependencies with the help of both Composer and Bower (a Javascript package manager).

As developers, most of us rely on third-party libraries as part of our web applications. PHP developers manage their dependencies with Composer, but how can you manage your client-side dependencies? Most projects start with one core JavaScript library (e.g. jQuery) and one or two plugins, but over time the application grows, and the list of JavaScript libraries grows as well. In this situation, Bower can help you, and in this article you will see how to integrate it into your own project.

You'll need Node installed to use Bower, but the installation process is simple - just one call to load it via npm. They help you get the configuration set up and how to specify its dependencies. Anyone familiar with how Composer works should feel right at home using a similar JSON structure. With that in place, you can move on to the next step, integrating it with Composer. In the Composer configuration, there's a setting for "scripts" that can be run before the install command is executed and some after the install is complete. This is where they call "bower install" to have it install the needed Javascript-based dependencies.

tagged: project dependencies bower composer integrate introduction

Link: http://techportal.inviqa.com/2014/01/29/manage-project-dependencies-with-bower-and-composer/


Trending Topics: