Tuesday, 25 June 2013

How to make people login into your website with their Google account

OpenID provides a safe, elegant and easy way for people to login into your website without having to fill in a registration form. They just have to have an account to one OpenID provider, a Google account for instance, and they will login into your site with this account.

I will show you how to implement it with Google accounts, but the source code is exactly the same for other providers (such as Yahoo!), you just have to change the URLs.
?How does it work ?
You just have to know that you don’t have to deal with the user authentication. You will provide a link to a Google page in which the user will :
  • give his credentials (or not, if he is already logged on Gmail for instance) :
  • give the authorization to Google to give you some his personnal data that you request :
Then the user will be redirect to a page of your website, that you chose, and you will be able to retrieve his personal data.

Let’s write some code !

We will have two part in our the code :
  • First, the code to retrieve the user personal data. Here, you just want to execute that code once, only when the user clicks on “Login with my Google account”. 
  • Then, the code to render the login button. You might want to display the login button on several pages, in your sidebar or whatever, so that code has to run each time you render the button.

1
We will be using a one-file PHP OpenID library that you can download here :LightOpenID. Just put this file in your project folder.

2
Here is the login.php file, it will be the page that the user willl be redirected to after having given his credentials and authorization to Google. This code retrieve and display the personal data of the user :
<?php
require_once 'openid.php';
$openid = new LightOpenID("my-domain.com");
 
if ($openid->mode) {
if ($openid->mode == 'cancel') {
echo "User has canceled authentication !";
} elseif($openid->validate()) {
$data = $openid->getAttributes();
$email = $data['contact/email'];
$first = $data['namePerson/first'];
echo "Identity : $openid->identity <br>";
echo "Email : $email <br>";
echo "First name : $first";
} else {
echo "The user has not logged in";
}
} else {
echo "Go to index page to log in.";
}
?>
Make sure to replace my-domain.com by your domain name.
If you have already a running signup/login system on your website, you might want to add a openid_identity field to your table users in your database and store in it $openid->identity. It is the unique ID that Google provides you to identify the user. The other fields may change if the user changes his Google profile.

3
And last step, the code to render the button, let’s say on the home page,index.php. It will call a Google window and it will tell this window to redirect to your site after.
<?php
require_once 'openid.php';
$openid = new LightOpenID("my-domain.com");
 
$openid->identity = 'https://www.google.com/accounts/o8/id';
$openid->required = array(
'namePerson/first',
'namePerson/last',
'contact/email',
);
$openid->returnUrl = 'http://my-domain.com/login.php'
?>
 
<a href="<?php echo $openid->authUrl() ?>">Login with Google</a>
Here you have to change the returnUrl field : put the absolute URL of the PHP page of step 2.
Once again, make sure to replace my-domain.com by your domain name.

4
To logout a user, just destroy the session :
session_destroy();
And that’s it ! Finally, some figures about with what OpenID provider users prefer login according to JanRain.

What users prefer

Other OpenID providers

You can use this code to make people login into your website with some other accounts : Yahoo, WordPress, AOL, … You just have to change the url $openid->identity by :
  • Google : https://www.google.com/accounts/o8/id
  • Google profile : http://www.google.com/profiles/~YOURUSERNAME
  • Yahoo : https://me.yahoo.com
  • AOL : https://www.aol.com
  • WordPress : http://YOURBLOG.wordpress.com
  • LiveJournal : http://www.livejournal.com/openid/server.bml

Other languages

You can find the equivalent of LightOpenID that I used in PHP in the other languages on this page of the OpenID.net wiki : Libraries.
Feel free to ask questions right here ↓

Monday, 24 June 2013

YouTube Downloader by ViStuffs

A free Google Chrome extension to download Youtube videos on your computer, works for both Mac and Windows.


After the extension is installed in your chrome broswer, you can easily download any Youtube videos on Youtube by clicking the download links under the videos.
Note If unable to download, please right click on Download Now! Button and click on save link as..

Installation Guide:

  • Download the extension file by clicking the Download Now button.
  • Click the wrench icon on the Google Chrome browser toolbar.
  • Select Tools > Extensions.
  • Locate the extension file on your computer and drag the file onto the Extensions page.
  • Click Install

    Sunday, 23 June 2013

    How to Root Samsung Galaxy Chat B5330 - ICS


     Do at Your Own Risk

    Might not work on Jelly Bean Update.

    Samsung’s entry-level Android ICS Device, the Samsung Galaxy Chat B5330, debuted in August this year and with that, it brought a choice for beginners to choose their next ICS device. The phone brings a physical QWERTY keypad along with a nice set of hardware to meet the requirements of a heavy chatter. No matter what great features the device comes with, the real potential can only be unlocked by rooting the device. To root your Samsung Galaxy Chat B5330 device, you can follow our guide.
    By editandroid.blogspot.com

    I. Before You Begin:

    1. Rooting voids the warranty of your device (until you unroot it).
    2. Please charge your device to have at least 60% of battery life left.

    II. Downloading Required Files:

    1. Root Package (Download link’s given in the first post, under Rooting section)

    III. Rooting the Samsung Galaxy Chat B5330:

    1. Download and place the Root Package file onto your Desktop. Do NOT extract it.
    2. Connect your device to your PC using the USB cable.
    3. Copy the Root Package file over to the SD card of your device.
    4. Once done, disconnect the device from your PC.
    5. Turn OFF the device.
    6. Reboot the device into Stock Recovery. To do so, press and hold the Volume Up+Home+Power buttons together.
    7. Once inside the recovery, choose apply update from sdcard.
    8. Select the Root Package(update.zip) you copied earlier to the device.
    9. Be patient and let it root the device.
    10. Once done, reboot the device.
    11. You’re good to go!
    Brilliant! You now have root access on your Galaxy Chat B5330 device

    How To Unroot Samsung Galaxy Chat B5330
    Samsung Galaxy Chat B5330 is an entry-level Ice Cream Sandwich smartphone from Samsung that delivers the power of Google’s latest (not the greatest) Android firmware to the users. We already have a root guide for the device that shows how you can get the most out of your device and in this guide, we’ll be showing you how you can unroot your device, to get the lost warranty back and to enjoy the stock performance of the device. Here’s how you can do it:

    I. Before You Begin:

    1. Your device needs to have at least 60% of battery life left.

    II. Downloading Required Files:

    1. Odin
    2. Stock Firmware (Download the appropriate firmware for your device)

    III. Unrooting the Samsung Galaxy Chat B5330:

    1. Download and place both the files onto your Desktop.
    2. Unzip files from both the archives to your Desktop.
    3. Double-click on the Odin executable file and it should launch.
    4. Click on PDA and select the Stock Firmware you extracted earlier to your Desktop.
    5. Checkmark the boxes that say Auto Reboot and F. Reset Time.
    6. Leave the Repartition box unchecked.
    7. Turn OFF your device.
    8. Reboot the device into Download mode by pressing and holding the Volume DOWN+Home+Power buttons together.
    9. Once inside the Download mode, connect your device to your PC using the USB cable.
    10. Hit Start in the Odin and it’ll begin flashing the firmware.
    11. Once it’s done, your device will automatically reboot.
    12. And you’re all done!
    Awesome! Your device has been successfully unrooted and you’re now running the latest official stock firmware on your device.

    Do at Your Own Risk

    Thursday, 13 June 2013

    Saturday, 1 June 2013

    How to Root Samsung Galaxy Chat B5330 Android 4.1.2 Jelly Bean

    Recognized XDA Developers, Chainfire recently released CF-Auto-Root file allowing Samsung Galaxy Chat B5330 users to root their devices easily.

    CF-Auto-Root is the root for "rooting beginners" and those who want to keep as close to stock as possible. CF-Root is meant to be used in combination with stock Samsung firmwares, and be the quickest and easiest way for your first root. In essence, it does nothing but install and enable SuperSU on your system, so apps can gain root access.

    Samsung Galaxy Chat B5330 users who have already updated their devices with Android 4.1.2 Jelly Bean, may root their devices using the tutorial below.


    Disclaimer: Rooting voids the warranty of your device. We and the developer of this rooting procedures shall not be held responsible if any undesirable outcomes may happen to your device. use of this root guide is solely at your own risk!

    Pre-requisites
    1. Install USB Driver for Samsung Galaxy Chat B5330 on the computer.
    2. Enable USB Debugging Mode on the phone by navigating to Settings > Developer Options (Android 4.0 or later) or go to Settings > Applications > Development (Android 2.3 or earlier).
    3. Make a backup of all your important data before following the guide.
    4. The Galaxy Chat should be factory unlocked and not locked to any particular carrier.
    5. Ensure the battery of the tablet is charged more than 80 per cent.
    6. The CF-Auto-Root file works only on Samsung Galaxy Chat B5330 running on Android 4.1.2 Jelly Bean firmware. Applying this to any incorrect variant might brick the device. Verify the model number of the Galaxy Chat by navigating to Settings > About Phone.

    File Required
    1. CF-Auto-Root for Galaxy Chat B5330 (CF-Auto-Root-zanin-zaninxx-gtb5330.zip)
    2. Odin 3.07

    Steps to Root Galaxy Chat B5330 on Android 4.2.2 Jelly Bean
    Step 1: Extract CF-Auto-Root and Odin 3.07 files using winrar/7zip/winzip or any other extracting tool.
    Step 2: Switch off the Galaxy Chat. Then boot the device into Download Mode by pressing and holding Volume Down + Home buttons together and then press the Power button until the device turns on. Now press the Volume Up button to enter Download Mode.
    Step 3: Launch Odin on the computer.
    Step 4: Connect the Galaxy Chat to the computer using USB cable while it is in the Download Mode. Wait until Odin detects the device. When the device is connected successfully, the ID: COM box will turn yellow with the COM port number. Additionally, the successful connected will be indicated by a message saying Added. If Odin fails to detect the device then re-install USB driver.
    Step 5: In Odin, click the PDA button and select the CF-Auto-Root-zanin-zaninxx-gtb5330.tar.md5 file.
    Step 6: Verify that Auto Reboot and F.Reset Time checkboxes are selected in Odin. Also, ensure the Re-Partition option in Odin is not selected.
    Step 7: Double-check and click Start in Odin. The installation process will now begin.
    Step 8: Once flashing completed, your phone will restart and soon you will see a PASSmessage with green background in the left-most box at the very top of the Odin. You can now unplug the USB cable to disconnect your device from computer.

    Samsung Galaxy Chat B5330 running on Android 4.1.2 Jelly Bean firmware is now rooted successfully. You can now install any app that requires root permission. Verify the root status of the device by downloading Root Checker app from Google Play Store.

    Thursday, 16 May 2013

    Airtel front query free gprs internet trick for June 01 2013

     

     

    This is front proxy very fresh and based in basic front proxy. this proxy give you very high speed download and free web surfing. this front query also use  in airtel 3g or 4g internet connection. so this proxy give you 960kbps in airtel 3g circle. and other as like it. this proxy also use any  mobile handler software. like operamini and uc  web. this proxy very fine work in raj. 

     

    Config. airtel mobile setting for your android and other mobile handset

     

    • Download any handler software ( install in my other front query post)
    • Make gprs setting in your 3g supported mobile 
    • Apn:- airtelgprs.com
    • Proxy;- 74.223.216.77
    • port:- 80
    • Install handler software
    • And put the below front query proxy 
    • http://121.241.248.6/track.pl/000000a/http://tricksmine.com or google.com
    • Now save and restart your  mobile
    • Done enjoy airtel free and blasting  speed in your mobile