title: How to implement openid google, yahoo and others
body: <p>I am trying to implement OpenID and for that I download <a href="http://www.openidenabled.com/php-openid" rel="nofollow">http://www.openidenabled.com/php-openid</a> and from that I picked up Auth folder with changing any thing to localhost directory and created a index.php file and whose code is as below:</p>
  
  <pre><code>&lt;?php
      if (!isset($_POST['submit'])) {
  ?&gt;
          &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "DTD/xhtml1-transitional.dtd"&gt;
          &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
          &lt;head&gt;
          &lt;title&gt;OPENID TESTING&lt;/title&gt;
          &lt;/head&gt;
          &lt;body&gt;
          &lt;form method="post" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;"&gt;
              Sign in with your OpenID: &lt;br/&gt;
              &lt;input type="text" name="id" size="30" /&gt;
              &lt;br /&gt;
              &lt;input type="submit" name="submit" value="Log In" /&gt;
          &lt;/form&gt;
          &lt;/body&gt;
          &lt;/html&gt;
  &lt;?php
      } else {
  
          // check for form input
          if (trim($_POST['id'] == '')) {
              die("ERROR: Please enter a valid OpenID.");
          }
  
          // include files
          require_once "Auth/OpenID/Consumer.php";
          require_once "Auth/OpenID/FileStore.php";
  
          // start session (needed for YADIS)
          session_start();
  
          // create file storage area for OpenID data
          $store = new Auth_OpenID_FileStore('./oid_store');
  
          // create OpenID consumer
          $consumer = new Auth_OpenID_Consumer($store);
  
          // begin sign-in process
          // create an authentication request to the OpenID provider
  
          $auth = $consumer-&gt;begin($_POST['id']);
          if (!$auth) {
              die("ERROR: Please enter a valid OpenID.");
          }
  
          // redirect to OpenID provider for authentication
          $url = $auth-&gt;redirectURL('http://localhost/', 'http://localhost/oid_return.php');
          header('Location: ' . $url);
      }
  ?&gt;
  </code></pre>
  
  <p>Now when I try to fill id from worldpress or myopenid.com is recognised and transfer me to the provider page for authentication but this is not happening with Google, yahoo or others service providers case. What I have to implement for Google or Yahoo</p>