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

SitePoint PHP Blog:
Git and WordPress: How to Auto-Update Posts with Pull Requests
Oct 24, 2017 @ 16:50:36

On the SitePoint PHP blog editor Bruno Skvorc has posted a tutorial showing how to combine Git and WordPress to make it easier to update posts on the site via pull requests.

At Bitfalls.com, we also use WordPress for now, and use the same peer review approach for content as we do at SitePoint.

We decided to build a tool which automatically pulls content from merged pull requests into articles, giving us the ability to fix typos and update posts from Github, and see the changes reflected on the live site. This tutorial will walk you through the creation of this tool, so you can start using it for your own WordPress site, or build your own version.

He starts by outlining the plan for the process including some of the functionality that will be put to use - like WPGlobus and Markdown files. He then walks you through the creation of an environment for the end WordPress installation (for testing), creates the webhook on the GitHub side to handle the push and the code needed to grab the content and push it into WordPress. He also includes an example of the workflow, showing a PR being created and merged to ensure the flow is functioning as expected.

tagged: wordpress git pullrequest tutorial push publish review

Link: https://www.sitepoint.com/git-and-wordpress-how-to-auto-update-posts-with-pull-requests/

Laravel News:
Easily Integrate HTTP/2 Server Push with a Laravel Middleware
Aug 12, 2016 @ 14:48:10

The Laravel News site has a recent post showing you how to integrate HTTP2 support into your Laravel-based application using some simple middleware.

As we all know technology changes fast and if you don’t stop and look around once in awhile, you could miss it. HTTP/2 is one area of our tech stack that I haven’t been keeping up with an honestly knew nothing about it until Laracon where Ben Ramsey gave a talk on the subject.

You can watch his talk here and his slide deck is available from his site to browse through. What amazed me is how easy it seemed to implement by utilizing server push or preload.

They describe this "Link" header process could work if done manually but points out that doing that manually for every asset is very time consuming. To help out they point out two packages that can help make it a bit more automatic. The post briefly shows their use (code example) basing the asset list on the contents of your Elixir configuration.

tagged: laravel middleware http2 push link header package

Link: https://laravel-news.com/2016/08/http2-server-push-middleware/

Cal Evans:
Announcing The CFP Report
Nov 06, 2015 @ 15:12:20

Whether you're an aspiring speaker or one that's presented many times, it can be difficult to keep track of which conferences have open Call for Papers and what they're offering to speakers who are selected. Cal Evans has started up a new project that provides a curated listing of conferences in the form of a mailing list to keep you up to date and informed - The CFP Report.

I want to talk about a new project I have called "The CFP Report" and invite you to join. [...] A few months ago, I was chatting with my good friend Brandon Savage when he posited an idea. "What if we setup a mailing list for people who wanted to know about open CFPs?"

[...] The more I thought about it, the more I kinda liked the idea. I did some research and yes, there are other good services that are doing similar things. However, I couldn’t find anything that would do the job I wanted done. Specifically, I wanted not only to know about CFPs, I wanted to know if they were CFPs to which I would want to submit.

He talks about his though processes for wanting to create the mailing list and what it provides. The list (or a "push notification service" as he calls it) is only delivered via email to those subscribed and covers not only PHP CFPs but also Python, Javascript and Ruby. The service is free and all it takes is a quick signup and you're good to go. If you've been interested in getting out and trying your hand speaking at a conference, this is the perfect way to keep up to date right in the same inbox you use every day.

tagged: callforpapers cfp cfpreport mailinglist push notification update

Link: http://blog.calevans.com/2015/11/05/announcing-the-cfp-report/

SitePoint PHP Blog:
Push your Drupal Site’s Events to your Phone with Pushover
Feb 12, 2015 @ 18:54:12

The SitePoint PHP blog has a new tutorial posted (by Daniel Sipos) about pushing notifications from your Drupal-based application via the Pushover service.

In this article I am going to show you how you can integrate Pushover with your Drupal site. I will illustrate a couple of examples of how you can use Pushover to notify yourself as soon as something happens on your site. The code I write in this article is also available in this repository so you can just clone that if you want to follow along.

He starts with an introduction to Pushover and what kinds of features it offers for the handling of push messages (with the app being not free, but "very affordable"). He help you get everything you need set up including a Pushover account and the Pushover class to use in a custom Drupal module. He includes the code you'll need to configure the module to use the library and a method to create the Pushover class instance. He then shows how to send messages for things like the addition of a new comment and user login via hooks, sending a message when an administrator logs in.

tagged: drupal tutorial pushover push message service mobile application

Link: http://www.sitepoint.com/push-drupal-sites-events-phone-pushover/

SitePoint PHP Blog:
Push Notifications with Prowl
Aug 22, 2013 @ 14:04:34

On the SitePoint PHP blog there's a new tutorial posted (by Lukas White) about connecting PHP with Growl notifications using the Prowl iOS-based tool.

Suppose, however, you want a quick and easy way to send messages to yourself or a select group of people without having to register an application with Apple and play around with various certificates and processes. You might be interested in learning about Prowl. [...] You can purchase a copy for your phone and “hook it up” to all sorts of services and applications – and perhaps most intriguingly, use its API to send messages from your own applications. That’s what we’ll look at in this article.

He helps you get all the pieces you'll need to get the example working - signing up for Prowl, downloading the iOS application and grabbing the API library from Github. He includes example code to set the provider key, create a filter for sending the message and pushing the request out to the API. He also includes an interesting example of a logging integration with Prowl and a ZendLog. He creates a custom log writer you can drop into your code.

tagged: push notifications prowl growl tutorial api

Link: http://www.sitepoint.com/push-notifications-with-prowl

Gonzalo Ayuso:
Sending Android Push Notifications from PHP to phonegap applications
Aug 06, 2013 @ 15:26:09

Gonzalo Ayuso has a new post today showing how he set up Android push notifications to a Phonegap-based application with PHP.

Last days I’ve been working within a Phonegap project for Android devices using Push Notifications. The idea is simple. We need to use the Push Notification Plugin for Android. First we need to register the Google Cloud Messaging for Android service at Google’s console, and then we can send Push notifications to our Android device.

He includes the steps you'll need to push the notification and the library to make the cURL connection out to the Google messaging platform. He's posted the full code out to github.

tagged: phonegap android push notification google cloud tutorial

Link: http://gonzalo123.com/2013/08/05/sending-android-push-notifications-from-php-to-phonegap-applications

Android Hive:
Android Push Notifications using Google Cloud Messaging (GCM), PHP and MySQL
Oct 17, 2012 @ 13:53:04

On the Android Hive there's a recent tutorial posted showing you how to use Google Cloud Messaging and PHP+MySQL to do push notifications on an Android phone.

As per google’s documentation “Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices”. Using this service you can send data to your application whenever new data is available instead of making requests to server in timely fashion. Integrating GCM in your android application enhances user experience and saves lot of battery power.

You can either follow along with the tutorial via the screencast (and download the code) or you can read through the text version, complete with code snippets, SQL and screenshots to help you along the way. The code for the Android side is included as well.

tagged: push notification android tutorial googlecloudmessaging mysql

Link:

James Morris' Blog:
Deploy a Silex App Using Git Push
Jul 05, 2012 @ 14:35:40

James Morris has a new post to his blog showing you how you can deploy a Silex-based application via git and a post-receive hook on the server side.

Up until a few days ago I used to use a small bash deployment script to deploy a few simple sites to my live box. The process was a git archive and extract, then an rsync to the live site. Only inspecting it recently I realised that rsync no longer sent just the changes but all of the files, I’d never noticed before as the sites were so small the deploy was over very quickly. The rsync used to work fine before as I would deploy my current working code where the timestamps on files would match the server. Since I started using git at home for dev, the git archive method timestamps the files with the latest commit’s timestamp. This messes up rsync.

His process involves a checked in version of Silex, a development branch, a push of the code to the live machine and an install script to set up Silex. He includes the "technical breakdown" and the information needed to replicate it - the .gitignore, setting up password-less SSHing, setting up the server and creating the git post-receive hook (a bash script).

tagged: git push deploy silex application hook tutorial

Link:

Sean Coates' Blog:
Deploy on push (from GitHub)
Jun 05, 2012 @ 15:49:13

Sean Coates has a new post today sharing an example push process for the times when you either just need to push code (without the build process) or you're just deploying something simple - a "deploy on push" hook built into your github repository.

Sometimes, you just need to deploy code when it’s ready. You don’t need a build; you don’t need to run tests - you just need to push code to a server. If you use git and GitHub (and I think you should be using GitHub), you can easily deploy on push. [...] There are really only three things that you need, in most cases, to make this work: a listener script, a deploy key and associated SSH configuration, and a post-receive hook.

He explains what each part of the process does and includes the simple PHP script that github calls to make the deployment (it's specific to his example, but you get the idea). He walks you through setting up the deploy key (a SSH key generated on your server) and how to get SSH to use this key when github comes knocking.

tagged: github deployment push hook tutorial

Link:

Kevin Schroeder's Blog:
Setting up a connection to the Zend Developer Cloud on Linux
Dec 02, 2011 @ 16:04:10

Kevin Schroeder has a method in one of his latest posts for hooking your linux-based system into Zend's phpcloud platform, complete with an automatic upload (so you're not constantly sftp-ing).

Connecting with the Zend DevCloud in Linux is actually quite easy if you know how to use SFTP. [...] But, as I said in a previous post, I hate having to do command line stuff for each and every file or commit. I like things to work seamlessly. So what I did was write a PHP script that connects to the DevCloud (or any SSH-based endpoint for that matter) and then monitors all of the files and directories for changes, such as a creation, modification or deletion event.

His script (available on github) uses the PECL inotify package to work, but once its set up, you can have the PHP process running the script in the background, pointed at your web root, and have it upload automatically.

tagged: inotify phpcloud zend cloud sftp automatic push

Link:


Trending Topics: