Posts marked with "Google" in tags

Create Your Own URL Shortening Service Using PHP & jQuery

I made a URL shortening service a year back using PHP & jQuery. It was pretty simple. You should know the concept of URL Shortening. The concept is simple. When a user sends a request to short a URL, PHP will check if the URL is valid. If it’s valid then PHP will make a string of 5 or 6 characters. A folder is created with the name of this string and an index.php file with header function code is created in this folder. This will make the folder redirect to the URL the user requested. Since it’s a folder no extensions will be seen ! So You can make up some pretty good URL‘s.

... [READ MORE]

Add Floating Like Box to Blogger Blog

Every Success Blog was popularized with the social integration such as Like Box, Share Box, Commenting and others. The social sharing widget will help other users to reach your blog. So, In this tutorial I’m going to tell you how to add a Floating Like Box. I made the like box floating, because wherever the user goes the like box will also go with him. Hence the user will notice the like box all the time and he will click sometime during his visit. The liking action will be posted to his Facebook Wall or Google + page or his Twitter and his friends who sees this post will also visit. That friends too like your post if it is good and thus your post will pass along a lot of people.

... [READ MORE]

Send Email using GMail SMTP server in PHP

This tutorial was suggested by SWDS. To send an e-mail using GMail’s SMTP server, you need extra help. Download the latest version of Swift Mailer Package from here.
This mailing class is simple, that’s why I recommend you to use Swift Mailer.
If you have enabled application specific password feature on Google Accounts, you may have to generate a new application password and use that password for SMTP authentication. Otherwise the example won’t be able to login to your google account.

... [READ MORE]

Setting up Google DNS in Ubuntu

Google‘s DNS service is spreading rapidly. It’s time for you to use it. I used it and noticed some great speed changes even though my internet is just a dial up connection. Here is how to set up Google‘s DNS on your Ubuntu Linux.
Open Network Settings (network-admin) by going to System -> Preferences -> Network Connections. Go to your default net connection and click on Edit button.

You will get a window like below :

... [READ MORE]

Better Google Chrome History Page

As you know, Google Chrome‘s Browser History is not efficient. It’s history is not like any other browsers. I think they made the History page in a hurry. If we want to search for a page we visited before, we won’t get it by searching on History page. That’s the main problem.
This problem was solved when a lot of users created an alternate History Page extension on Chrome Webstore.
In this post I’m gonna tell the most used History Alternate Extension. It’s Better History extension. You can download the extension from here.

Deleting:

... [READ MORE]

The main reason why adsense was disapproved

From my experience with Adsense I got disapproved after a visit from a URL to my blog. The URL was SPAM which is known as REFERRAL SPAM. See more about REFERRAL SPAM here.

Why Adsense account got disapproved of Referral SPAM ?

In the Google Adsense policies, It says that you should not pay someone to visit your blog/site. When you are placing the ad on your blog, Google tracks each visit to your blog. When they see a suspicious URL in the traffic sources they count it as a paid to click URL. Hence you will get disapproved.

... [READ MORE]

Login with Google OAuth without using Google PHP Library

Google PHP Library is very hard to use and is very long. It wasted a lot of my time. So I decided to do it manually.
I created a new library for Google OAuth in PHP.

It is very simple to use and you don’t have to worry about a thing.

FAQ

How to get a client Id and Client Secret ?

1) Go to https://code.google.com/apis/console and create a new project.
2) Fill up the form.
3) In the redirect URL’s type in the URL of the index.php in your site.
4) Add your site URL as trusted Origin.
You will now get a client Id and a Client Secret Id. Type both of those in each $client_id and $client_secret variable of Configuration section in index.php file.

... [READ MORE]

List of Google OAuth Scopes

Here is the list of Google OAuth Scopes. It can be used for different purposes.

  <td class="secondary">
    https://www.googleapis.com/auth/adsense
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/gan">
  <td style="margin-right: 20px;">
    Google Affitrate Network
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/gan
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/analytics.readonly">
  <td style="margin-right: 20px;">
    Analytics
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/analytics.readonly
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/books">
  <td style="margin-right: 20px;">
    Google Books
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/books
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/blogger">
  <td style="margin-right: 20px;">
    Blogger
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/blogger
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/calendar">
  <td style="margin-right: 20px;">
    Calendar
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/calendar
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/devstorage.read_write">
  <td style="margin-right: 20px;">
    Google Cloud Storage
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/devstorage.read_write
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.google.com/m8/feeds/">
  <td style="margin-right: 20px;">
    Contacts
  </td>
  
  <td class="secondary">
    https://www.google.com/m8/feeds/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/structuredcontent">
  <td style="margin-right: 20px;">
    Content API for Shopping
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/structuredcontent
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/chromewebstore.readonly">
  <td style="margin-right: 20px;">
    Chrome Web Store
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/chromewebstore.readonly
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://docs.google.com/feeds/">
  <td style="margin-right: 20px;">
    Documents trst
  </td>
  
  <td class="secondary">
    https://docs.google.com/feeds/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/drive">
  <td style="margin-right: 20px;">
    Google Drive
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/drive
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/drive.file">
  <td style="margin-right: 20px;">
    Google Drive Files
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/drive.file
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://mail.google.com/mail/feed/atom">
  <td style="margin-right: 20px;">
    Gmail
  </td>
  
  <td class="secondary">
    https://mail.google.com/mail/feed/atom
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/plus.me">
  <td style="margin-right: 20px;">
    Google+
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/plus.me
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/plus.me">
  <td style="margin-right: 20px;">
    Google+ Friend list
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/plus.login
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://apps-apis.google.com/a/feeds/groups/">
  <td style="margin-right: 20px;">
    Groups Provisioning
  </td>
  
  <td class="secondary">
    https://apps-apis.google.com/a/feeds/groups/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/latitude.all.best https://www.googleapis.com/auth/latitude.all.city">
  <td style="margin-right: 20px;">
    Google Latitude
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/latitude.all.best https://www.googleapis.com/auth/latitude.all.city
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/moderator">
  <td style="margin-right: 20px;">
    Moderator
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/moderator
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://apps-apis.google.com/a/feeds/atras/">
  <td style="margin-right: 20px;">
    Nicknames Provisioning
  </td>
  
  <td class="secondary">
    https://apps-apis.google.com/a/feeds/atras/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/orkut">
  <td style="margin-right: 20px;">
    Orkut
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/orkut
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://picasaweb.google.com/data/">
  <td style="margin-right: 20px;">
    Picasa Web
  </td>
  
  <td class="secondary">
    https://picasaweb.google.com/data/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://sites.google.com/feeds/">
  <td style="margin-right: 20px;">
    Sites
  </td>
  
  <td class="secondary">
    https://sites.google.com/feeds/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://spreadsheets.google.com/feeds/">
  <td style="margin-right: 20px;">
    Spreadsheets
  </td>
  
  <td class="secondary">
    https://spreadsheets.google.com/feeds/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/tasks">
  <td style="margin-right: 20px;">
    Tasks
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/tasks
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/urlshortener">
  <td style="margin-right: 20px;">
    URL Shortener
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/urlshortener
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/userinfo.email">
  <td style="margin-right: 20px;">
    Userinfo &#8211; Email
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/userinfo.email
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.googleapis.com/auth/userinfo.profile">
  <td style="margin-right: 20px;">
    Userinfo &#8211; Profile
  </td>
  
  <td class="secondary">
    https://www.googleapis.com/auth/userinfo.profile
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://apps-apis.google.com/a/feeds/user/">
  <td style="margin-right: 20px;">
    User Provisioning
  </td>
  
  <td class="secondary">
    https://apps-apis.google.com/a/feeds/user/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://www.google.com/webmasters/tools/feeds/">
  <td style="margin-right: 20px;">
    Webmaster Tools
  </td>
  
  <td class="secondary">
    https://www.google.com/webmasters/tools/feeds/
  </td>
</tr>

<tr class="op-menutrstitem op-menuchecktrstitem multiple" val="https://gdata.youtube.com">
  <td style="margin-right: 20px;">
    YouTube
  </td>
  
  <td class="secondary">
    https://gdata.youtube.com
  </td>
</tr>
Adsense Management

See this post to know how to login/signup your users without using Google OAuth PHP Library.

... [READ MORE]

Get Google Profile Picture URL by email id using PHP

This is a trick using Google Profile.
First of all we are going to set a variable with a Google E-mail address (Gmail address). We are going to set it with my E-mail address

$email=’subins2000@gmail.com’; 

Then we are going to split @ from the mail address.

list($id, $domain) = split("@",$email);

Next we are going to send a request to Google Profiles to fetch the IMAGE url.

$headers = get_headers("https://profiles.google.com/s2/photos/profile/".$id, 1);

The variable $id above is from the splitted part.
Finally we have to get the URL of the user’s profile picture.

... [READ MORE]

My Short URL – a site for shortening URL’s

My Short URL is my latest invention. A site for shortening URL’s like goo.gl and bit.ly.

<div>
  You can short URL&#8217;s on the site <a href="http://msurl.tk/" style="font-weight: bold;">MSURL.TK</a>.
</div>

<div>
</div>
As other projects the site is also hosted by AppFog and the free domain is given by My.Dot.TK.
The project was created under 30 minutes and the lines of code is less that 64.
It’s written in PHP as you already know it. 
The shortened URL only has 13 characters (without HTTP://).
The shortened URL will not have .php extension. I will tell you how to view page without file extension on the next tutorial.
Enjoy Shortening URL !
... [READ MORE]

Follow/Subscribe

Telegram 

Mastodon  Twitter

GitHub GitLab

Subdomains

Demos  Lab

Past

This blog was once on WordPress. Now a static site. See source code on

GitLab