Accessing POST data

Handling XML requests from PHP involves accessing the raw POST data. This can be done by accessing the $HTTP_RAW_POST_DATA variable, but this depends on having the always_populate_raw_post_data directive enabled in your php.ini. A less memory intensive alternative is php://input, which doesn’t need any special php.ini setting, but it’s not available for multipart/form-data requests.

Reading the . . . → Read More: Accessing POST data

Retrieve and display latest tweets

With all this social networking hype, many sites display their latest tweets on their pages. Here’s a simple method to display your latest tweets from PHP:

Let’s assume your twitter username is “mytwittername”. You can retrieve your latest tweets in XML format at the following address:

http://twitter.com/statuses/user_timeline/mytwittername.xml

replacing mytwittername with your username. By default, it . . . → Read More: Retrieve and display latest tweets

Getting the substrings between given delimiters

One of the most common and overused type of operation a web developer needs to perform is no doubt string manipulation. Very often strings need to be trimmed and chopped, cleaned of unwanted characters, chunk split into little pieces, glued back in a different order, encrypted and decoded back and forth, searched through, reversed, converted . . . → Read More: Getting the substrings between given delimiters

Categories

Archives

Calendar

June 2017
M T W T F S S
« Jul    
 1234
567891011
12131415161718
19202122232425
2627282930