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

TutsPlus.com:
Building With the Twitter API: Creating Friends to Follow
Mar 23, 2017 @ 17:32:04

The TutsPlus.com site has posted the latest tutorial in their "Building with the Twitter API" series showing how to, in a Yii2 application, automatically add friends to a Twitter account via the Twitter API. You've probably seen this in several services that offer suggestions of followers to add to your list.

Today I'll guide you through using the Yii2 Framework for PHP to access the Twitter API and automate adding friends to people's Twitter accounts. (If you'd like to learn more about Yii2, check out our parallel series Programming With Yii2.)

And, I've created a website, Twixxr.com, which will let you demonstrate the feature by adding prominent women on Twitter for your account to follow.

The tutorial starts with links to some of the other Twitter tutorials that have been posted in the past and how things have evolved to make it easier in a Yii2 application. He starts by helping you get the Twitter OAuth PHP Library installed and lists some of the goals of the end result. The code is included to authorize the user and handle the callback once they've approved the app in the normal OAuth flow. It then shows how to connect via the API using that user's information, load profiles for the suggested users and link them as a friend. The tutorial finishes with a look at performance and a bit of code used to handle the backend processing of the request instead of performing it in real time.

tagged: twitter tutorial api oauth2 friends follow suggestion yii2

Link: https://code.tutsplus.com/tutorials/building-with-the-twitter-api-creating-friends-to-follow--cms-27492

/Dev/Hell Podcast:
Episode 86: Necromantic Spies and Imagined Corporate Friends
Jan 11, 2017 @ 15:28:44

The /Dev/Hell podcast, hosted by Chris Hartjes and Ed Finkler, has posted their latest episode today - Episode #86: Necromantic Spies and Imagined Corporate Friends:

Welcome to the very first episode of 2017! We’re back after a nice break for the holidays and ready to get back to being insightful and unfiltered. In this episode we talked about the concept of “programming as craft” with Chris and Ed having a great discussion about what should follow after the phrase “programmers need to learn empathy.”

Ed also released some music, and is donating all the proceeds to OSMI. Chris was sad that he did not get the opportunity to re-record the vocal tracks from some of Ed’s older material in his own signature vocal style. Chris also talked (not so briefly) about the new laptop he bought and the security measures he decided to take with it.

You can listen to this latest episode either using the in-page player or by downloading the mp3 directly. If you enjoy the show be sure to subscribe to their feed and follow them on Twitter for updates on when new shows are released.

tagged: devhell podcast ep86 spies friends chrishartjes edfinkler

Link: http://devhell.info/post/2017-01-10/necromantic-spies-and-imagined-corporate-friends/

Stefan Koopmanschap:
How to Get the Most Out of a Conference
Nov 01, 2013 @ 17:49:51

Stefan Koopmanschap recently posted a great new article about how you can get the most out of conferences and what they have to offer besides just the sessions.

At the most excellent PHPNW conference, Kat convinced me to deliver the first unconference talk of the day. It took me a while to get the right topic. I ended up with a topic I felt everyone at the conference could use for the rest of the two days that they were there: How to get the most out of a conference. For those that were not there, I want to try and put my unconference talk into a blogpost, so that everyone can use this information for their next conference.

He's broken it down into a few different major topics including the obvious "learn from the best" as well as:

  • Learn and meet the best
  • Find your new colleagues (or new friends)
  • The backchannels
  • Hack away! (at hackathons)

He also makes a great recommendation about providing feedback - not only is it important to the conference to let them know they've done a good job, but also to the speakers to help improve their skills.

tagged: conference advice learn colleagues friends social feedback hackathon involvement

Link: http://leftontheweb.com/blog/2013/10/25/How_to_get_the_most_out_of_a_conference/

9Lessons.info:
Facebook Style Tag Friends with Jquery, Ajax and PHP
Aug 26, 2010 @ 14:58:49

On 9Lessons.info today there's a tutorial posted by Srinivas Tamada about creating a simple "tag my friends" system (like Facebook's) with PHP, jQuery and a bit of Ajax magic.

I received a request from my reader that asked to me how to implement Facebook like tag friends in your status or update box. It is great feature to adding friends start with @ symbol. I had tried this with Jquery, Ajax and PHP, it's simple just collaboration of my previous posts.

If you want to skip to the good part, there's a demo and code download otherwise you can follow along with his code that creates a database table, includes the HTML for the interface, a backend PHP script to connect to and some CSS to make it all look a bit nicer.

tagged: facebook friends tutorial jquery ajax demo

Link:

Jaanus' Blog:
How to retrieve remote files in your web apps and still be friends with the server
Jan 18, 2006 @ 13:19:36

In this post on Jaanus' blog today, they show how you can grab remote files from a server and still "remain friends" with the server.

It often happens that when you're building a web page or app, you may want to include some content from a remote server. Say that it's some statistic figure that the remote outputs as HTML or TXT and you then want to retrieve it and either do something with it or directly display as part of your own page. And you're working in PHP.

PHP provides a fancy way of opening and including files directly over HTTP, which they call "URL wrappers". As tempting as it may seem, in the long run doing remote opens with URL wrappers is not the best practice. So here’s what I came up with when needing to do this kind of caching thing in my own scenarios. It requires you have the cURL module installed and that the webserver can read and write from /tmp.

They provide the short script that does the work inside a function (easy to drop into a class), and grabs the remote file, and pulls down to /tmp for the script to use. It even allows you to specify a timeout for the file, forcing the script to grab a new copy every so often...

tagged: retrieve remote files friends with server curl timeout retrieve remote files friends with server curl timeout

Link:

Jaanus' Blog:
How to retrieve remote files in your web apps and still be friends with the server
Jan 18, 2006 @ 13:19:36

In this post on Jaanus' blog today, they show how you can grab remote files from a server and still "remain friends" with the server.

It often happens that when you're building a web page or app, you may want to include some content from a remote server. Say that it's some statistic figure that the remote outputs as HTML or TXT and you then want to retrieve it and either do something with it or directly display as part of your own page. And you're working in PHP.

PHP provides a fancy way of opening and including files directly over HTTP, which they call "URL wrappers". As tempting as it may seem, in the long run doing remote opens with URL wrappers is not the best practice. So here’s what I came up with when needing to do this kind of caching thing in my own scenarios. It requires you have the cURL module installed and that the webserver can read and write from /tmp.

They provide the short script that does the work inside a function (easy to drop into a class), and grabs the remote file, and pulls down to /tmp for the script to use. It even allows you to specify a timeout for the file, forcing the script to grab a new copy every so often...

tagged: retrieve remote files friends with server curl timeout retrieve remote files friends with server curl timeout

Link:


Trending Topics: