Posts tagged api
gmail, yahoo & live messenger contact inviter script
20Howdy,
you guys have probably noticed that most of the contact inviter script out there were broken now because most of the new api’s only support Oauth protocol instead of the good ol’ login / password authorization.
It’s great because now you don’t have to give the those website your login information but It is a bit more complicated for us developers to set it up so I’ve decided to create a small set of classes that will allow you to easily implement such a feature on your website.
First off all, you can check out the simple proof of concept by checking out the demo here and getting the script on gitHub here.
Some people who may know my blog will notice that I am in no way a designer so It doesnt look amazing but it works and that’s what this article is about ! ( if someone feels like he could make it look better you can get the code from github. see at the end of the article for more info).
Ok so now the fun stuff.
(more…)
Related Posts:
Dealing with Monster.com SOAP with PHP5
0Recently I had to set up a system that would post a job offer to monster.com web service using SOAP.
Once I made the script to generate the XML I started looking into the SOAP class that PHP5 provides but I soon started to feel the headache comming !
So I justed wanted to help out If some of you were facing the same issue : FORGET that soap class and use a basic CURL !
Here is my code snippet
$headers=array("Accept: text/xml","Content-Type: text/xml");
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,"https://208.71.198.74:8443/bgwBroker");
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $xml); // your soap xml that you generated earlier
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
$return = curl_exec($curl);
curl_close ($curl);
And there you go ! you just have to handle the return info.
I hope that this will help someone one day !

Last comments