Skip to content
Miguel Angel Vallejo RockmanX!

Miguel A Vallejo

AI & Network Engineer — Established 1982.

Recent Posts

  • OpenClaw Is Not About Privacy. It Is About Leverage.
  • Install Syncthing on Debian 11 or Proxmox LXC container
  • Installing MariaDB + PHPMyAdmin on Debian 11/Debian 11 Proxmox LXC Container
  • Fake Online Pet Store Scams Are On The Rise
  • The Inherit Dangers Of Nextdoor And How It’s Really Facebook 2.0

Recent Comments

  • Miguel on Install Syncthing on Debian 11 or Proxmox LXC container
  • Centraals on Install Syncthing on Debian 11 or Proxmox LXC container
  • Miguel on Install Syncthing on Debian 11 or Proxmox LXC container
  • Centraals on Install Syncthing on Debian 11 or Proxmox LXC container
  • Centraals on Install Syncthing on Debian 11 or Proxmox LXC container

Pulling Last Tweet From Twitter With PHP

So I made this post due the twitters infamous changes that screwed up my last script that pulled your last tweet via atom protocol…

Anyways I can’t take full credit for the script since part of it I got from Bradley Spencer, I simply added the formatting functionality after the tweet extraction which he did not provide on his blog ;)

[cc lang=”php”]

// set user name
$username=’websymantecs’;
// set format
$format=’json’;
//get tweets and decode them into a variable
$tweet=json_decode(file_get_contents(“http://api.twitter.com/1/statuses/user_timeline/{$username}.{$format}”));

//now lets take this variable/string and manipulate it to display it formatted correctly…

$link = strstr($tweet[0]->text, “http”);
$text = substr($tweet[0]->text, 0, strpos($tweet[0]->text, “http”));

echo $text . ‘‘.$link.’‘;

[/cc]

Published by

Miguel

I am a bilingual Network Engineer with over 20 years of professional experience in computer science and information technology. I am the founder and operator of Web Semantics, based in Vancouver, Washington, where I design, secure, and manage enterprise-grade infrastructure for small and mid-sized businesses across the West Coast. I provide bilingual IT support in English and Spanish, specializing in network architecture, systems engineering, security, and operational resilience. Soy un ingeniero de redes bilingüe con más de 20 años de experiencia profesional en ciencias de la computación y tecnología de la información. Soy fundador y operador de Web Semantics, con sede en Vancouver, Washington, donde diseño, protejo y administro infraestructura empresarial para pequeñas y medianas empresas en la costa oeste. Ofrezco soporte de IT bilingüe en inglés y español, con especialización en arquitectura de redes, ingeniería de sistemas, seguridad y resiliencia operativa.View all posts by Miguel

Posted on October 1, 2012January 31, 2013Author MiguelCategories Open Source Solutions, PHP, Web DevelopmentTags Pulling Last Tweet From Twitter With PHP

Post navigation

Previous Previous post: Sick And Tired Of Censorship And This False Sense of Freedom Of Speech Online!
Next Next post: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626/mcrypt.so’ – libmcrypt.so.4: cannot open shared object file: No such file or directory in Unknown on line 0
Proudly powered by WordPress