How to login with hotmail on website? Reviewed by Momizat on . First creat a Application on Hotmail go to:- https://account.live.com/developers/applications Click on the Create Applicatin then open form and fill all details First creat a Application on Hotmail go to:- https://account.live.com/developers/applications Click on the Create Applicatin then open form and fill all details Rating: 0

How to login with hotmail on website?

First creat a Application on Hotmail go to:-

https://account.live.com/developers/applications

My application
Click on the Create Applicatin then open form and fill all details.
Create Application form

Get Client Id and Client Secret For API

API

PHP code hotmail-login.php on website

include_once("hotmail/live_connect.inc.php");
$cnt_live = new MocrosoftLiveCnt(array(
	'client_id' 	=> 'xxxxxxxxxxxxx',
	'client_secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
	'client_scope' 	=> 'wl.basic wl.emails',
	'redirect_url' 	=> 'http://www.site.com/hotmail-login.php'
));
if(!isset($_GET["code"])){
	//$loginUrl = $cnt_live->GetLoginUrl();
	header('Location: '.$cnt_live->GetLoginUrl());
}
//https://login.live.com/oauth20_authorize.srf?client_id=xxxxxxxxxxxxxxxx&scope=wl.basic wl.emails wl.birthday&response_type=code&redirect_uri=http://www.site.com/hotmail-login.php;
$user_info = $cnt_live->getUser();
if(!$user_info && isset($_GET["code"])){
	$access_token="";
	$access_token 	= $cnt_live->getAccessToken($_GET["code"]);

	$cnt_live->setAccessToken($access_token);
	header('Location: '.$cnt_live->GetRedirectUrl());

}
if(isset($_GET["logout"])){
	$cnt_live->distroySession();
	header('Location: '.$cnt_live->GetRedirectUrl());
}
if($user_info){

	 $res=array();
	 if(isset($user_info->emails->account)) $res['email'] = $user_info->emails->account;
	if(isset($user_info->first_name)) $res['users_fname']=$user_info->first_name;
	if(isset($user_info->last_name)) $res['users_lname']=$user_info->last_name;
	$res['id']=$user_info->id;
	print_r($res);

}else{
	//show login button
	header('Location: '.$cnt_live->GetRedirectUrl());
}

Comments (29)

  • website

    whoah this blog is great i love reading your articles. Keep up the great work!
    You know, a lot of people are looking round for this information, you could help them
    greatly.

    Reply
  • sdorttuiiplmnr

    Good info. Lucky me I reach on your website by accident, I bookmarked it.

    Reply
  • Plenty of Fish Dating Site of Free Dating

    I constantly spent my half an hour to read this webpage’s content every day along with a cup of
    coffee.

    Reply
  • Free Auto Approve List 7-8-2018

    I hope you all are having a great weekend. I have a new list for you. Read the latest update on how I compiled the list. I’m still surprised by the results.

    Reply
  • Free auto approve list 8-9-2018

    I just wanted to let you all know that I added a new list. It has taken me awhile to let everyone know due to server issues. Everything should be back on track now.

    Reply
  • Free auto approve list 8-9-2018

    I’ve been having issues with my Windows hosting. It has set me back quite a bit while making the next list. This is the current list that I have. I should add another list in less than a week. I’ll let you all know when the next list is ready. Thank you for your patience.

    Reply
  • Сialis

    Very good blog post. I absolutely appreciate this website.
    Stick with it!

    Reply
  • minecraft

    It’s going to be ending of mine day, except
    before end I am reading this fantastic piece of writing
    to improve my experience.

    Reply
  • minecraft

    May I just say what a comfort to find someone that truly knows what
    they are discussing on the internet. You actually know
    how to bring a problem to light and make it important.
    A lot more people have to read this and understand this side of your story.
    It’s surprising you are not more popular given that you certainly have
    the gift.

    Reply
  • minecraft

    What’s up to every , since I am truly eager of reading this
    weblog’s post to be updated on a regular
    basis. It consists of nice data.

    Reply
  • brawl stars brawl ball guide

    Hi there! I could have sworn I’ve been to this site
    before but after reading through some of the post I
    realized it’s new to me. Anyhow, I’m definitely glad I found it and I’ll be bookmarking and checking back
    often!

    Reply
  • hacks for rise of civilization

    You’ve made some decent points there. I looked
    on the web for more information about the issue and found most people will go along with
    your views on this web site.

    Reply
  • Lester

    Very nice post. I simply stumbled upon your blog and wanted to mention that I have really loved browsing your weblog posts.
    After all I’ll be subscribing on your rss feed and I’m hoping you
    write once more soon!

    Reply
  • Chante

    Thanks for sharing your thoughts. I really appreciate your efforts and I am waiting for your further post thanks once again.

    Reply
  • Stuart

    I do believe all the ideas you have offered
    on your post. They’re really convincing and will certainly work.
    Nonetheless, the posts are too brief for beginners. May you please extend them a bit from next time?
    Thank you for the post.

    Reply
  • minecraft

    Good day! I know this is kind of off topic but I was wondering
    which blog platform are you using for this website?
    I’m getting fed up of WordPress because I’ve had problems with hackers and
    I’m looking at options for another platform. I would be
    fantastic if you could point me in the direction of a good platform.

    Reply
  • minecraft

    Amazing things here. I am very happy to see your article.

    Thanks so much and I am having a look forward to contact you.
    Will you kindly drop me a mail?

    Reply
  • minecraft

    Hi there! This is my first comment here so I just wanted to give a
    quick shout out and tell you I truly enjoy reading through your posts.
    Can you suggest any other blogs/websites/forums that cover
    the same subjects? Thanks a lot!

    Reply
  • Jannie

    I am now not certain where you are getting your information, however great topic.
    I needs to spend a while studying much more or understanding more.
    Thank you for wonderful info I used to be in search of this information for my mission.

    Reply
  • pet friendly apartments columbia mo

    Hi there, You’ve performed an excellent job.

    I’ll definitely digg it and in my opinion recommend to my friends.

    I am sure they’ll be benefited from this web site.

    Reply
  • Malcolm

    I believe this is one of the so much vital info for me.
    And i’m happy studying your article. However should remark on few general issues, The site
    style is great, the articles is in reality excellent : D.
    Just right job, cheers

    Reply
  • Len Mccleave

    A powerful share, I simply given this onto a colleague who was doing a little analysis on this. And he in truth bought me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the treat! But yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If potential, as you change into expertise, would you thoughts updating your blog with extra details? It is extremely useful for me. Huge thumb up for this blog post!

    Reply
  • Clair

    Hi my loved one! I wish to say that this article is awesome, great written and
    come with approximately all important infos. I would like to peer more posts like this
    .

    Reply
  • b ed course

    Lastly, they are going to know their stuff. Want more excellent news?

    Reply
  • Modesta

    Hi I am so happy I found your site, I really found you by accident, while I was
    searching on Aol for something else, Anyways I am here now and would
    just like to say kudos for a incredible post and a
    all round thrilling blog (I also love the theme/design), I don’t have time to look over it all at the minute but I have book-marked it
    and also included your RSS feeds, so when I have time
    I will be back to read much more, Please do keep up the superb work.

    Reply
  • gamefly free trial

    Hi there colleagues, its impressive paragraph regarding cultureand fully explained, keep it up all the time.

    Reply
  • Edmundo

    I truly love your website.. Excellent colors & theme.
    Did you build this website yourself? Please reply back as I’m hoping to create my own website and
    would love to find out where you got this from or what the theme is named.
    Many thanks!

    Reply
  • 카지노

    Hi to every single one, it’s truly a pleasant for me to visit this web
    site, it contains valuable Information.

    Reply
  • Claudia

    Hello to every one, the contents present at this website are truly amazing for people experience, well, keep up the nice work fellows.

    Reply

Leave a Comment

© 2014 Powered By