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:
Using the Google Analytics API with PHP Logging In
October 02, 2014 @ 09:47:08

The SitePoint PHP blog has a new tutorial posted from Younes Rafie showing you how to use the Google Analytics API from PHP (part one of a series) using the Google PHP API client library to make the connection.

In this series, we're going to see how we can use the Google Analytics API to interact with our Google Analytics data via PHP. [...] In this article we're going to build an app that looks like Google Analytics Explorer, but to make it short, we're going to limit the functionality and discuss how we can extend our demo.

He starts with an overview of the different parts of the Google Analytics APIs including the metadata and real-time reporting systems. In the tutorial he'll be combining several of these to provide all the data needed. After walking you through the creation of a Google developer account, he starts in on the code. With credentials in hand and the library installed via Composer, he shows how to make the connection, check if it's logged in and makes a simple "home" controller that handles the login and OAuth validation process.

0 comments voice your opinion now!
google analytics api login oauth composer tutorial library

Link: http://www.sitepoint.com/using-google-analytics-api-php-logging/

Sameer Borate:
Sentiment Analysis of Twitter feeds
September 30, 2014 @ 10:07:35

Sameer Borate continues on his theme of Twitter-related development (part one is here) with his latest post showing how to do sentiment analysis of Twitter feeds. His "sentiment analysis" analyzes a string to determine if it's generally negative or positive based on the AFINN word dataset.

In the last post we looked into accessing Twitter API v1.1 from PHP. In this post we will see how we can add sentiment analysis for the tweets. Generally speaking, sentiment analysis aims to determine the attitude of a writer with respect to some topic. A basic task in sentiment analysis is classifying the polarity of a given text, whether the expressed opinion in a sentence is positive, negative, or neutral. In this post we will use a simple sentiment analysis library to analyze the sentiment of tweets.

His example uses the viracore/caroline library to do the actual analysis. He shows how to install it via Composer and how to make a sample checker, returning the score and the comparative ranking. With that working, he shows how to integrate it into the Twitter connection originally created in the first post, extracting tweets from his own timeline and returning their scores.

0 comments voice your opinion now!
tutorial twitter sentiment positive negative afinn api oauth

Link: http://www.codediesel.com/social/sentiment-analysis-of-twitter-feeds/

Sameer Borate:
Creating Twitter Apps in PHP
September 29, 2014 @ 09:28:42

Sameer Borate has a post today showing how you can create a simple Twitter application in PHP making use of their REST API and the twitter-api-php library.

In this post we will look into accessing Twitter REST API in PHP. This can be useful if you need to post Tweets from your PHP application or anaylze, search Tweets. In the following examples we will use the twitter-api-php PHP wrapper for Twitter v1.1 API. Although there are a few wrappers around, this one I like for its simplicity.

He helps you get the library installed (via Composer) and create an application on the Twitter side at apps.twitter.com. Sample code is included showing how to connect to the API with your credentials, including handling the OAuth authorization piece. From there he shows two examples of action to make on the API: posting a new tweet and searching for new tweets based on a query string.

0 comments voice your opinion now!
twitter application tutorial introduction library oauth search post tweet

Link: http://www.codediesel.com/social/creating-twitter-apps-in-php/

SitePoint PHP Blog:
Using Guzzle with Twitter via Oauth
July 31, 2014 @ 10:54:01

Continuing on with his series about using the Guzzle PHP HTTP library, Miguel Ibarra Romero is back with this new post showing how to connect your PHP application, via Guzzle, to the Twitter OAuth protected service.

In a previous article, we found out about Guzzle and how it can aid us in the task of establishing communication with third party APIs over HTTP. We used it to get the output of a random number generator and for basic interaction with Github's API. [...] While interacting with Github's API we discovered that it supports basic authentication (sending plain username/password). But what if the API we want to use just offers OAUTH authentication?

He shows how to use Guzzle's own OAuth subscriber to make a basic connection to the API. He walks you through the installation of the subscriber (via Composer) and an example of its use. He explains each part of the code, giving a little background on where it fits into the OAuth request and where to put your API secret and key to make the connection work. Finally, he includes the code to handle the callback once the OAuth request is successful, grabbing the token data and adding it to the user session.

0 comments voice your opinion now!
oauth twitter guzzle http library tutorial

Link: http://www.sitepoint.com/using-guzzle-twitter-via-oauth/

PHPClasses.org:
Lately in PHP Podcast #48 - To TDD or Not TDD?
June 27, 2014 @ 11:38:37

On the PHPClasses.org site today Manuel Lemos has released the latest episode in their "Lately in PHP" podcast series: Episode #48 - To TDD or Not TDD?.

Lately the debate about whether you should use TDD or not in all software projects all the time has been very intense. [...] They also talked about the upcoming end of life release of PHP 5.3, getting information of parameter type hinting with reflection, using object methods on native data types, security problems of OAuth implementations, and the built-in support of Composer to access password protected repositories.

You can listen to this latest episode either through the in-page audio player, by downloading the mp3 or you can watch the live recording over on the PHPClasses YouTube playlist. A transcription of the recording is also provided as well as links to some of the topics mentioned.

0 comments voice your opinion now!
phpclasses latelyinphp ep48 podcast tdd typehint oauth security composer

Link: http://www.phpclasses.org/blog/post/239-To-TDD-or-Not-TDD--Lately-in-PHP-podcast-episode-48.html

9Lessons.info:
Login with GitHub OAuth using PHP
February 11, 2014 @ 11:36:57

On the 9lessons.info site they've posted a new tutorial showing you how to login with GitHub via OAuth via a custom script.

Nowadays GitHub.com(web based hosting service) is the most import part in developer's life. In this I want to discuss how to implement GitHub OAuth login system for your web project, this is very simple adopt and sure it will helps you to increase your web project registrations. Please check my previous posts for Google, Facebook and Instagram OAuth login system scripts.

The system uses a simple database to store the current user information and their Github ID. They walk you through the flow of creating a new application on the Github site and include the scripts to make the initial request, redirect to the Github site for authorization and handle the callback correctly.

0 comments voice your opinion now!
github oauth tutorial token

Link: http://www.9lessons.info/2014/02/login-with-github-oauth-php.html

Lorna Mitchell:
OAuth Middleware for Slim
October 09, 2013 @ 11:53:37

Lorna Mitchell has posted about some middleware for the popular Slim (micro)framework that helps with OAuth functionality.

OAuth can be anything you want it to be, the standards are lax and give you plenty of room for getting the right implementation for your system. However you proceed, though, you'll need to check an access token on every request - and in a Slim application, a middleware can help enormously since it hooks in to every request by design. I've recently implemented this and thought I would share.

She's created a basic middleware component that can be easily dropped into the framework to handle the checking of the tokens via an "AuthService" object. She also includes a brief snippet of how she generates the codes, combining the output of bin2hex and openssl_random_pseudo_bytes.

0 comments voice your opinion now!
oauth middleware slim access token validation generate

Link: http://www.lornajane.net/posts/2013/oauth-middleware-for-slim

Lorna Mitchell:
Twitter Search API Using PHP and Guzzle
July 11, 2013 @ 12:49:45

Lorna Mitchell has a new post to her site today showing how she connected to Twitter with Guzzle, the popular PHP-based HTTP client (also used in the Amazon Web Services PHP client).

In case you missed it, Twitter updated their APIs recently, so that you have to authenticate to use even their search APIs to return publicly-available results. This is an increasing trend for API providers, to provide either very limited or nonexistent access for unauthenticated users, I think so they can rate limit consumers that swamp them. To cut a long story short, that meant I needed to update my dashboards that keep an eye on twitter searches to do more than just call file_get_contents in the general direction of the right URL.

She walks you through the creation of the client complete with the OAuth plugin (included with Guzzle) to make an OAuth request to api.twitter.com. With the client created, she shows a simple search call to the "tweets" endpoint.

0 comments voice your opinion now!
twitter search guzzle tutorial http client oauth api

Link: http://www.lornajane.net/posts/2013/twitter-search-api-using-php-and-guzzle

SitePoint.com:
How to Add OAuth Authentication to Your Twitter App
June 26, 2013 @ 11:27:53

In this quick post to SitePoint, they show you how to use the Twitter OAuth library to connect your application with the new Twitter OAuth authentication methods.

Thanks Twitter. Not only have you removed open access to public Twitter timelines, you're expecting developers to contend with cryptic authentication documentation! Many of us simply want to display our own tweets on our own website, but it's obvious Twitter prefers us to use their widgets. Despite the convoluted Twitter instructions, implementing OAuth in your lovingly-crafted API 1.0 application is reasonably straight-forward if you use the libraries provided by talented group of (non-Twitter) developers.

They break it down into a few easy steps (largely made easy because the library does most of the heavy lifting for you):

  • Create your Twitter Application
  • Create an Access Token
  • Download the OAuth Library
  • Modify Your Timeline Fetching Code
0 comments voice your opinion now!
twitter oauth tutorial library example api authentication

Link: http://www.sitepoint.com/twitter-1-1-oauth-php

PHPMaster.com:
Integrating Open Authentication using Opauth
March 11, 2013 @ 09:07:52

On PHPMaster.com there's a new tutorial showing you how to implement OAuth authentication in your application using the Opauth Php library. This library lets you connect to any of a number of OAuth service providers and authenticate.

Open Authentication has evolved as a standard for third-party authentication in recent years and allows us to securely authenticate our application's users through a standard interface. Twitter and Facebook has been the standouts among dozens of authentication service providers. [...] In this article we'll explore how we can effectively use Opauth to standardize our authentication strategies. I'll be using CodeIgniter here, but even if you're not familiar with CodeIgniter, I suggest you continue reading since it will be similar for other frameworks as well. Once you understand the necessary details for integration, adapting to any framework is super simple.

He talks some about the Opauth library and shows the full authentication flow that your script will follow when using it. Code is included showing how to include and integrate the Opauth library including setup and configuration of the object and the controller/view code to implement the login form.

0 comments voice your opinion now!
opauth oauth library tutorial implement authenttication



Community Events





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


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

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