How to change twitter status with php and curl without oAuth

9 settembre 2010 - Fonte: http://www.barattalo.it
Twitter api authentication Since the 31 of august 2010, twitter made its API more secure, stopping basic authentication calls. So, if you used basic authentication you have to change your code and implement oAuth authentication model (you can read about oAuth on Wikipedia). The oAuth authentication model Using oAuth means that you have to register [...] Related posts:
  1. PHP curl bot to update Facebook status
  2. href="http://www.barattalo.it/...

    Leggi il seguito »

PHP bot to get wikipedia definitions

29 agosto 2010 - Fonte: http://www.barattalo.it
Wikipedia, the collaborative and multilingual encyclopedia project, has a lot of usefull terms defined in its database, you can find informations on artists, cities, medical terms, cars, brands… quite everything. If you need to add some content to your pages without having that content in your database you can use Wikipedia API or Google define [...] Related posts:
  1. Tiny url encode and decode with PHP
  2. href="http://www.barattalo.it/PHP to get twitter infos and avatar
  3. href="http://www.barattalo.it/...

    Leggi il seguito »

Send push notification to iPhone with PHP and pushme.to

9 agosto 2010 - Fonte: http://www.barattalo.it
Push service is a technology that allows you to send alerts/notifications to a mobile device. Blackberry has its own push service, iPhone hase its own, and also Android devices has theri own push service. You can learn more on Wikipedia page. I want to send push to my iPhone, but I’m not able to develop [...] Related posts:
  1. PHP Web page to text function
  2. href="http://www.barattalo.it/PHP to get twitter infos and avatar
  3. href="http://www.barattalo.it/...

    Leggi il seguito »

PHP to post on a Facebook page

28 luglio 2010 - Fonte: http://www.barattalo.it
Hi, I’ve modified the Mini Bot Class, I’ve fixed the Facebook status update and I’ve implemented the function to post on the wall of a facebook page: suppose you have a page of a brand, and you need to update it regularly with a cron job… Very, very usefull, isn’t it? Nothing more to say. Just [...] Related posts:
  1. PHP curl bot to update Facebook status
  2. href="http://www.barattalo.it/PHP Web page to text function
  3. href="http://www.barattalo.it/...

    Leggi il seguito »

Parsing Flickr Feed with PHP tutorial

30 maggio 2010 - Fonte: http://www.barattalo.it
I’ve spent about 30 minutes to find a javascript embed to print out a custom thumbs list of flickr photos, but I didn’t find anything clean enaugh… and I’ve not enaugh time to spend to read the flickr’s API’s… So, I’ve searched for the feed of the user, and I’ve found it at the bottom of [...] Related posts:
  1. PHP bot to grab meteo information from Google
  2. href="http://www.barattalo.it/Do spelling using google spell checker
  3. href="http://www.barattalo.it/...

    Leggi il seguito »

Correct headers to download a CSV from PHP

27 aprile 2010 - Fonte: http://www.barattalo.it
With these headers you can force a download from php, for example, to let the user download a csv frmatted text. To make all the thing works you have to print data with “tabs” char, even if csv means “comma separeted value”. This is necessary because Microsoft Excel will understand tabs, but not commas. header("Expires: Thu, 19 [...] Related posts:
  1. Reading mp3 informations with php (id3 tags)
  2. href="http://www.barattalo.it/...

    Leggi il seguito »

Always remove slashes from GET and POST

27 aprile 2010 - Fonte: http://www.barattalo.it
This is a small piece of code that I use since many years. It removes all slashes from $_GET and $_POST arrays if magic quote parameter is setted. Sometimes is usefull, put it at the beginning of your scripts… if (get_magic_quotes_gpc()) { function slashes($e) { if (is_array($e)) return array_map("slashes", $e); else return stripslashes($e); } if (isset ($_POST) && [...] Related posts:
  1. Recursive remove directory (RMDIR) in PHP
...

Leggi il seguito »

Mini Bot Class Updated

9 aprile 2010 - Fonte: http://www.barattalo.it
Now there are 17 bots included in this class! Well I’ve updated the mini bots class with some new things: you can now retrive the list of videos from a Youtube user, you can retrieve the images return by Google Images when searched with a query and I’ve added some function to handle Twitter account through [...] Related posts:
  1. PHP google images mini bot
  2. href="http://www.barattalo.it/PHP curl bot to update Facebook status
  3. href="http://www.barattalo.it/...

    Leggi il seguito »

PHP google images mini bot

30 marzo 2010 - Fonte: http://www.barattalo.it
This simply php function will retrieve the links of the images from Google Images searched with a keyword. The function just calls images.google.it and parse the html to find the url of the images, in this case the urls are stored in the javascript, so the parsing doesn’t use any html tag to find data. [...] Related posts:
  1. PHP bot to grab meteo information from Google
  2. href="http://www.barattalo.it/Do spelling using google spell checker
  3. href="http://www.barattalo.it/...

    Leggi il seguito »