title: Yahoo open id login api
body: <p>Im new to open id, but still i have tried to integrate the open id in my website. Im using yahoo provider to login in to my website. Could any help me in getting the user information like yahoo mail id , first name , last name.</p>
  
  <p>I have take the below code from a website which is provided for google, i have changed the provider to yahoo</p>
  
  <p><strong>Code which i have tried:</strong> </p>
  
  <pre><code>&lt;?php
  # Logging in with Google accounts requires setting special identity, so this example shows how to do it.
  require 'openid.php';
  try {
  # Change 'localhost' to your domain name.
  $openid = new LightOpenID('localhost');
  if(!$openid-&gt;mode) {
  if(isset($_GET['login'])) {
  $openid-&gt;identity = 'https://me.yahoo.com';
  header('Location: ' . $openid-&gt;authUrl());
  }
  ?&gt;
  &lt;form action="?login" method="post"&gt;
  &lt;button&gt;Login with Yahoo&lt;/button&gt;
  &lt;/form&gt;
  &lt;?php
  } elseif($openid-&gt;mode == 'cancel') {
  echo 'User has canceled authentication!';
  } else {
  echo 'User ' . ($openid-&gt;validate() ? $openid-&gt;identity . ' has ' : 'has not ') . 'logged in.';
  print_r($openid-&gt;ax_to_sreg);
  }
  } catch(ErrorException $e) {
  echo $e-&gt;getMessage();
  }
  </code></pre>
  
  <p>After loggin im getting out put like this :</p>
  
  <pre><code>User https://open.login.yahooapis.com/openidx20/user_profile/XXXX has logged in.
  </code></pre>
  
  <p>what is the use of above url? How can i fetch the user information?</p>