News Feed
Sections




News Archive
feed this:

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

SitePoint PHP Blog:
Push Notifications with Prowl
August 22, 2013 @ 09: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.

0 comments voice your opinion now!
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
August 06, 2013 @ 10: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.

0 comments voice your opinion now!
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
October 17, 2012 @ 08: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.

0 comments voice your opinion now!
push notification android tutorial googlecloudmessaging mysql


James Morris' Blog:
Deploy a Silex App Using Git Push
July 05, 2012 @ 09: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).

0 comments voice your opinion now!
git push deploy silex application hook tutorial


Sean Coates' Blog:
Deploy on push (from GitHub)
June 05, 2012 @ 10: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.

0 comments voice your opinion now!
github deployment push hook tutorial


Kevin Schroeder's Blog:
Setting up a connection to the Zend Developer Cloud on Linux
December 02, 2011 @ 10: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.

0 comments voice your opinion now!
inotify phpcloud zend cloud sftp automatic push


Giulio Pons' Blog:
Send push notification to iPhone with PHP and pushme.to
August 11, 2010 @ 13:15:14

In a new post to his blog Giulio Pons talks about how to send push notifications to an iPhone using the pushme.to application installed on the user's phone.

Push service is a technology that allows you to send alerts/notifications to a mobile device. Blackberry has its own push service, iPhone has its own, and also Android devices has their own push services. [...] I want to send push to my iPhone, but I'm not able to develop an iPhone application that receive push alerts, and I don't want to send only email alerts.

You set up the application on your phone and make a widget on their site for your application to use. Included in the post is also the PHP you can use to connect to the pushme.to service (using a curl POST request to send form encoded info to their servers).

0 comments voice your opinion now!
push notification iphone pushmeto service curl


Jani Hartikainen's Blog:
How to make a file downloadable through your script
October 10, 2008 @ 07:51:55

Jani Hartikainen has posted a quick tip for Zend Framework users out there looking to force a download from their script.

"How do I make a file downloadable through my script?" This seems to be a relatively common question on #zftalk nowadays, so here's a quick wrapup!

He compares the two ways - the usual PHP-only way of using header() calls and echoing out the file versus the more Zend Framework way - using a Response object to pull in the content, set the headers and a helper to display/render the data output.

0 comments voice your opinion now!
download file zendframework push content header


ThinkPHP Blog:
Comet in conjunction with a PHP socket server - server-client communication
September 02, 2008 @ 08:41:55

In a new post to the ThinkPHP blog today there's a look at combining Comet with PHP to make a simple method for the client to talk back to the server outside the usual methods.

If a couple of users have opened the application there are already some hundred or thousand requests per second. The outcome of this is a big load for your server and a highly increased traffic - your server will in a senseless way be overloaded. In conclusion, our problem is the enormous amount of polling without knowing whether the server really wants to send a new push. Let's turn the initial situation around. And we get the solution to our problem: Comet.

With Coment, the model changes and the request is "cached" on the server-side automatically in a single Comet instance. Coordinate this with another recommendation of theirs, a PHP socket server, and you can do some pretty interesting things.

0 comments voice your opinion now!
communication socket server comet ajax push pull


Chris Hartjes' Blog:
How To HTTP-PUT A File Somewhere Using PHP
January 14, 2008 @ 09:39:00

Chris Hartjes has a quick post (but complete with code) about moving files around a bit differently than the norm - it's his method for using a HTTP-PUT to push a file out.

A work project is getting close to 0.1 status. Pretty underwhelming, I know. One of the last 'milestones' for 0.1 is taking these wonderful XML documents that my web app creates and sends them to an internal web service. This web service will accept documents via an HTTP PUT [...] so I dug around a bit on the web and put together some code.

The code is a generic "publish" method that opens a stream to the remote server and, in a binary format, pushes the contents of a local file and parses out the response.

0 comments voice your opinion now!
http put remote location file push http put remote location file push



Community Events





Don't see your event here?
Let us know!


install podcast api bugfix language opinion interview package release list laravel symfony tips library deployment framework introduction voicesoftheelephpant community series

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework