Twitter Posting with PHP and Curl

As it’s so utterly and incredibly easy to do this, I thought I’d add to the resources of how to post to message to your Twitter account using PHP and Curl.

So, to add to the other PHP scripts I’ve been plonking out here, here is the PHP source code to a simple function which will post to a Twitter account. Send data to it from a form or a service, or even another script, even from an llHTTPRequest from an LSL script in Second Life! Easy and interesting stuff, that messaging. 😉

Here you go:

16 Responses to “Twitter Posting with PHP and Curl”

  1. 1 Luke March 21, 2007 at 4:23 am

    Nice… I was about to write something like this myself. It saves me some time looking up how to interface curl from PHP.


  2. 2 kosso March 21, 2007 at 4:55 am

    That the idea! 🙂 Happy to have helped.

  3. 3 Dhoster March 22, 2007 at 8:58 pm

    We offer Bullet Proof dedicated servers & Antiabuse hosting for direct mailing, all types of adults, logs, fakes and other projects.

    We have:
    · 100 Mbit channel
    · Guaranteed uninterrupted power supply
    · Support service
    · Anonymity
    · Remote access to power supply (APC PDU)

    Standard server configuration: Pentium 4 3.0G/DDR2 1024Mb/HDD 80Gb Sata2

    Also, any configuration can be ordered.

    After the server will be ordered setup is done within 24 hours.

    All types of spam is allowed.

    You can pay us by:
    – webmoney
    – E-gold

    If you have any questions, please contact us:
    icq: 567-540 (Dice)

    Thank you for your time and attention!
    Best regards, Dreamhoster.

  4. 4 Topherchris March 23, 2007 at 1:29 am

    Thanks for posting this. Lots of potential uses.

  5. 5 nemoforone March 29, 2007 at 6:58 pm

    What about the possibility of pulling out of Iraq, letting Iran invade and lose resources fighting their own kind,
    and then come in and mop up the dregs?

  6. 6 Rae April 5, 2007 at 6:59 am

    Thank you for this! 🙂

    And also (!), it’s so good(?!!) to see I can stop freaking out and/or attempting to grok this spamming nemoforone guy’s (yes, he is a guy. i have a short portfolio of ‘his existence’ in my mind, thanks to my … paranoia re: ‘crap that may or may not be spam’.

    phewf. My apologies for all of that 😉

    ~Rae (still patiently looking forward to the hubby recompiling(+ ?) for cURL, erm, COMPLIANCE heheh)

  7. 8 Pauly September 11, 2007 at 7:52 pm

    Look at all the spam you’re getting, you want to do a bit of a tidy up mate…

  8. 9 ememjammer September 17, 2007 at 4:18 pm

    So I was off work and surfing and found this place and thought I would join up. I don’t have much more to say right now except I need to start reading some of the older posts to get up to speed before I can start posting.


  9. 10 BuySalvia October 14, 2007 at 5:02 am

    How are you all on this fine, fine day?
    I’m doing quite well, and wanted to share the love.

  10. 11 xztheericzx November 8, 2007 at 2:37 pm

    i’m eric. joining a couple boards and looking
    forward to participating. hehe unless i get
    too distracted!


  11. 12 Zeratulss November 12, 2007 at 9:47 pm

    24% of Americans believe that the Internet is able for a time to replace them with a loved one. For obvious reasons, such sentiments particularly prevalent among residents of the United States alone. Both men and women can replace the beloved, beloved trips to the World Network. However, the willingness to such transactions vary among followers of different ideologies: conservatives frowned relate to this idea, and the “progressive-minded” on the contrary, Nerkarat it.

    Study company Zogby International also showed that every fourth resident of the United States have their own representation in the web-site or internet-stranichka. Creating internet-dvoynikov most passionate about young people (18-24 years of age) – 78% of them have personal Web page. In doing so, 68% of those surveyed said that the World Wide Web, they do not appear in its original capacity, their virtual overnight seriously different from the real.

    Only 11% of Americans would agree implantable microchip in his brain, which would provide them with direct contact with the Internet. But the situation is changing, in the case of children. Almost every fifth resident of the United States would agree to equip their child safety device which would allow him to track the movement in space on the Internet.

    10% of U.S. stated that the Internet brings them to God. ” In turn, 6% are convinced that because of the existence of the World Wide Web God away from them.

    And how you feel? Sorry bad English.

  12. 13 trandetroda November 15, 2007 at 4:03 am

    I’ve just registered at the forum. This is my first message.
    Please don’t become angry about me.
    Thank you.

  13. 14 November 23, 2007 at 11:13 pm

    Please prompt where it is possible to buy online viagra

  14. 15 zapalyt December 17, 2007 at 7:44 pm

    izvenite no nam nado sdelat test
    vi ved ne bydete protiv admini

  1. 1 Posting to Jaiku using PHP « kosso’s braingarden Trackback on October 10, 2007 at 3:43 pm
Comments are currently closed.

Who is this ‘kosso’ anyway?

I am a 'Createc'. A creative technologist, entrepreneur/ hacker/ geek. Worked on building things on the web for over 12 years.

Used to work at BBC News interactive and created the publishing and delivery systems for video news to get distributed on huge screens in major railway stations around the country.

I left the BBC to become CTO / sole-lead architect/developer at for three years.

I have now left them to build a start up a new system called 'Phreadz', which is a 'Social Multimedia Conversation Network', integrating everything that is 'V.I.T.A.L' to us on the web. Video, Images, Text, Audio and Links.

I built the whole thing my myself. I programmed every line of code and positioned every pixel. I'm looking forward to attracting an hiring new members of the team to help me out! :)

There are currently over 1000 happy and helpful beta testers on the system so far and one client of a white-labelled solution.

@kosso : twitter

kosso's flickr stream

March 2007
« Feb   Apr »


  • 254,440

Top Clicks

  • None

%d bloggers like this: