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

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/

Gareth Heyes:
Tweetable PHP-Non Alpha
December 13, 2012 @ 09:40:25

Gareth Heyes has a new post that shares some of his efforts to write "non-alpha PHP", using characters other than the alpha-numeric ones to write executable PHP scripts. In his case, this involves a lot of pluses, underscores and square brackets.

I started to try and break the 10 charset limit of PHP non-alpha after @InsertScript showed me that PHP Dev supports [] syntax for arrays. I wondered if it would be possible to break the limit within production PHP. At first I thought you could but then after some testing I found that there was no way to concat without "." and no way to call a string as a function without $ and =. However since I got into PHP Non-alpha again I thought why not try and improve it and make the code tweetable.

He works through the whole process of his discovery - starting with the creation of a non-alpha version of "0" (zero), moving into letter creation and finally all the way up to a full word..."assert". The result is tweetable code that echoes that string and contains more symbols than letters. If you're interested in more of this non-alpha kind of coding, check out some of the other posts on his blog.

0 comments voice your opinion now!
nonalpha code tweet plus underscore squarebracket


Emanuele Minotto:
PHP in a Tweet
September 14, 2012 @ 10:19:09

Emanuele Minotto has a recent post with a set of "PHP in a tweet" posts that do all sorts of things.

Yesterday an ex colleague tweeted something that captured my attention, so I started thinking to a Twitter-powered code golfing competition. Looking for other examples.

Tweets included in the list are snippets like:

  • A dependency injection container
  • A super simple web framework
  • A microframework
  • Bypassing array_intersect

There's some game rules included in the post so you can contribute your own to the the comments. Several have already been added including a base64 encoding variant and getting the extension of a file.

0 comments voice your opinion now!
tweet size code twitter framework dic


Community News:
Win a phpDay/jsDay 2012 Ticket
March 29, 2012 @ 10:20:38

The jsDay/phpDay organizers have announced a contest to win a free ticket to this year's event(s), one for each conference:

GrUSP is organising a tweet contest and its prizes will be two tickets, one for each conference. The contest will start today (March 29th) at 1pm CEST and will end April 1st at 7pm CEST.

Anyone can enter - all you have to do is tweet a post with a few things: the "#grsup" hashtag, a mention of the twitter accounts for the events, a link to the conference site and something about the event. Be sure and get those tweets posted before April 1st a 9am CEST - they'll pick the winners soon after! (Oh and multiple entries are accepted so the more you tweet, the better your chances!)

0 comments voice your opinion now!
jsday12 phpday12 ticket contest win tweet twitter


PHPMaster.com:
Understanding OAuth - Tweeting from Scratch, Part 2
October 25, 2011 @ 10:09:48

On PHPMaster.com today they're posted the second part of their OAuth series showing you how to use the authentication mechanism to connect to Twitter's API. (Part one is here.

Welcome back to Understanding OAuth - Tweeting from Scratch. This is Part 2 of the two-part series and picks up right where we left off in Part 1 with your returned Access Credentials. Since obtaining the credentials is the grueling part of the process, there's not much more left to do except posting a tweet on the user's behalf. Hopefully you'll find the final steps to be a lot easier to follow and more fun to implement.

They show you how to store the credentials from Part 1 into your session for safe keeping and include a simple form you will use to send a tweet to Twitter. They choose to manually build the HTTP POST request, including the credential headers along with the payload (oauth_consumer_key, oauth_signature, oauth_token, etc).

0 comments voice your opinion now!
oauth tutorial tweet series connection authentication api


Phil Sturgeon's Blog:
Twiny-Framework the framework small enough to tweet
December 18, 2009 @ 09:28:18

Inspired by Twitto, Phil Sturgeon has create his own tweetable framework to try to "one-up" Fabien Potencier's version.

This idea was not my own, but was inspired by Twitto. During some extreme boredom at work I decided to "one-up" this teeny-tiny framework and improve on it. My framework does this by allowing you to run Controller files and methods in a similar way to CodeIgniter, while Twitto only has the ability to run functions from a single file.

He includes both the code for the "framework" and an example of how to create a simple controller class to work with it. He also shows how you can get a bit more MVC with it by adding in a view layer.

1 comment voice your opinion now!
twiny framework tweet mvc


PHPImpact Blog:
The PHP framework that fits in a tweet!
March 09, 2009 @ 11:16:43

In the spirit of making the most out of the room you have Fererico Cargnelutti has pointed out a framework in a tweet (on Twitter) with some of the new PHP 5.3 additions - Twitto.

Twitto is the smallest and fastest PHP Web framework, and the first one to use the newest features of PHP 5.3. Packed in less than 140 characters, it fits in a tweet! Despite its size, Twitto is bundled with a default controller, is E_STRICT compliant, and generates an error if you try to access a controller that does not exist.

It was developed by Fabien Potencier (of symfony framework fame) as a part of the 140 Characters Webapp Challenge

0 comments voice your opinion now!
framework tweet twitter fabienpotencier symfony character webapp challenge


Doug Brown's Blog:
Use PHP to Twitter Your Tweets
January 13, 2009 @ 07:57:34

Doug Brown has posted a quick tutorial showing how to use the cURL extension in PHP to send tweets off to the Twitter API.

I recently got an email from a reader asking me if I could help them with a small script to post updates to a Twitter account using PHP. I figured this might be something that a few others might be interested in, so I decided to post about it.

His script opens a connection to the "twitter.com/statuses/update.xml" file and posts the username, password and contents of the tweet. If it returns a 200 code (the HTTP "Success" code), then all is well and it was posted. Of course, this simple script is just a start - he recommends other things to add like more input validation, making it into a class rather than procedural and adding in some Javascript to check the length of the tweet.

0 comments voice your opinion now!
twitter tweet curl extension tutorial javascript input validate oop



Community Events





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


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

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