Tag: PHP

  • FriendRetweet: Automatically Retweet Popular Tweets

    FriendRetweet is a command-line PHP script that allows you to automatically retweet the most popular tweets of the people you’re following. Each time it is run, the app will scan your users home timeline and find the most popular tweet since the last time it was run. It will then retweet that tweet. Download Download […]

  • PHP TIP: A quick, non-RegEx way of replacing an IMG tag’s SRC= attribute

    It’s often useful to be able to swap out the src= attribute of an HTML IMG tag without losing any of the other attributes. Here’s a quick, non-regex way of doing this. It uses the PHP DOM API to create a tiny HTML document, then saves the XML for just the IMG element. function replace_img_src($original_img_tag, […]

  • TIP: Turn WordPress Page Titles On or Off Using Custom Fields

    Most WordPress themes display page titles for every page. This is usually what one wants, but sometimes it’s useful to be able to easily turn off WordPress page titles for individual pages but still keep them on by default. This is easy to do with custom fields. For simplicity’s sake, I am going to base […]