Prevent automatic Google shorten URL visit

When a user request a password reset, we send an email with a reset link shortened by Google URL Shortener.

Problem is, the link is being visited before / without the user clicking it. How can I prevent this?

// Google Shorten URL code. $googer = new GoogleURLAPI($key); $short_url = $googer->shorten($short_url); return $short_url;`

-------------Problems Reply------------

You can't. Google will fetch the link to get information (such as the title) from it as part of the shortening service.

Just send a regular link like everyone else. You don't need it to be pasted into Twitter (where there is a message length limit) or posted on a billboard (where people have to type it).

If you really need this solution, you could try to detect the Google Bot visiting your reset page. It should send a specific user agent.

Category:php Views:2 Time:2018-02-11

Related post

  • Asp.net MVC prevent automatic conversion of url 2011-08-05

    I have a Asp.net MVC 2 project. My start page has following link: http://localhost:2666/Home/Index?SomeID=4f62c452-4513-4dd0-b235-830d721815e4 but when I use RedirectToAction method it will be changed to the short version below: http://localhost:2666

  • Google Short Url Api returns encoded url 2013-08-18

    I'm trying to get a short url for http://www.facebook.com/sharer/sharer.php?s=100&p[url]= (for facebook sharing) using Google shorten url API. The problem appears when it's return the short URL like http://goo.gl/xxxxx but the long url behind is

  • How to create shorten Url using google shortener api 2011-05-12

    i am trying to shorten a url using google shortener api, i tried my luck to find something on google that could help me but i found no blog or something that on java/android that could help me.If someone have a better resources please suggest me. Her

  • How to have user input URL in google's URL Shortener? 2015-01-19

    So im making an a fun console app that the user types in a url and returns the shortened version of it. So when i state: storage= "{\"longUrl\":\"https://www.facebook.com/\"}"; //Store website/link URL instead of facebook.com how do i use urlString?

  • Using Bitly API to shorten URLs 2011-04-27

    I found the Bitly API code below on this site. I'm having a hard time getting it to create and then echo a Bitly shortened URL for a variable called $fullurl. How would I do that? EDIT: No error code appears, just no bitly shortened URL is shown. EDI

  • Determine Final Destination of a Shortened URL in PHP? 2009-08-23

    How can I do this in PHP? e.g. bit.ly/f00b4r ==> http://www.google.com/search?q=cute+kittens In Java, the solution is this: You should issue a HEAD request to the url using a HttpWebRequest instance. In the returned HttpWebResponse, check the Resp

  • How does the google short url works? 2010-01-06

    How can the Google short URL cater for so many URLs in web with just four character, even though alphabets are case sensitive? http://goo.gl/SUWp Say fn(some url)-> four letter for url, how can they suddenly use the same function which gives five

  • Where should I create a shortened URL to my users' profile page for MVC architecture? 2010-02-18

    I have a Rails app where people have a profile page - http://prettylongdomainname.com/profile_username To create the profile username, I use a before_create AR hook in my model: before_create :generate_username def generate_username self.username = a

  • Is there any way to shorten url by goo.gl by javascript 2010-10-19

    I want to add a button at my webpage, when I click the button it will try to locate goo.gl and input the current url. How could I use goo.gl service by javascript? FYI: I found somthing at here http://www.labnol.org/internet/create-google-short-url/1

  • What is the best way in PHP or JS to expand shortened URLs like Bitly, Tinyurl to find the original URL? 2010-12-21

    I am using the Twitter and Facewbook API to pull posts that potentially contain shortened URLs using bit.ly or TinyURL like services. I need to do a real-time expansion to get the original URL then pull content from that URL into my app. ------------

  • How to POST request to Google Shortener API with Google API Java Client and parse a JSON response? 2011-01-18

    I want to use the Google Shortener API. I want to use the google api java client library to post a request and parse the JSON response. Next, I post the code I have tried: import java.io.IOException; import net.sf.json.JSONObject; import com.google.a

  • Generating sharing message and shortened URL to Twitter 2011-06-20

    I am using a Twitter ghetto sharing on a very simple Python based mobile site return "http://mobile.twitter.com/home?status=" + urllib.quote(link) I'd like to change the sharing so that Twitter messages gets the page title (I have it) and shortened U

  • Custom Google profile URL 2011-06-30

    Now when google have changed their profiles in the last couple of days I cannot find any way of setting the profile URL. I have done this in the past but I had to create another account today and the feature is nowhere to be found. The instructions f

  • ASP.NET Why is this shortening url code redirecting to page 2011-07-01

    Hey I have the following method public static string GetShortenedURL(String inURL) { String shortURL = ""; String queryURL = "http://api.bit.ly/shorten?version=2.0.1&longUrl=" + inURL + "&login=&apiKey="; HttpWebRequest request = WebReque

  • iphone+Webservice which gives shorten url in response 2012-01-18

    I want the web service in json OR in xml which gives the shorten url in response. I have to implement the web service in iPhone application. Let me know of any web services which do the following: If I give as the request Then it will return http://g

  • SQL | Convert Google Map URL to Lag and Lng 2012-02-08

    In my phpmyadmin SQL database, I have hundreds of Google map URL. I want to change them into lag and lng automatically. For example: http://maps.google.com.hk/maps?f=q&source=embed&hl=zh-TW&geocode;=&q=軒尼詩道+438+號&aq;=&sll=22.2

  • Verification of User Entered Google map URL 2012-03-21

    Hi I am currently working on a real estate site. the users on the website can post ads related to their property. they also have an option to enter google map url if they want their ad to have a map of the location. My problem is how will i verify if

  • How to prevent automatic reboot with windows xp update 2013-01-18

    Whenever there is a windows xp update there is an icon that appears in my task bar. I have the option to click on it and download when it is most convenient. Unfortunately if a period of passes in which I do not download and install it, it will do it

  • outlook prevented automatic download of some pictures in this message 2014-04-17

    I have a user who when he goes to open an attachment in an email he gets a message that states this: If there are problems with how this message is displayed, click here to view it in a web browser. Click here to download pictures. To help protect yo

  • Can you use keyword explicit to prevent automatic conversion of method parameters? 2008-10-06

    I know you can use C++ keyword 'explicit' for constructors of classes to prevent an automatic conversion of type. Can you use this same command to prevent the conversion of parameters for a class method? I have two class members, one which takes a bo

  • Code in NSTimer prevents automatic sleep 2009-03-31

    I have an NSTimer running in my application that collects some data and sends it to a server periodically. In production the timer will fire every few hours. I am worried about interfering with automatic sleep. In testing, some combinations of timer

  • Why does WebClient timeout when trying to crawl this shortened URL? 2009-05-22

    All, I have a small webcrawler that sometimes has to crawl twitter and pull out URL's. I use a modified version of the Webclient class provided in the .net framework. Normally this works fine, even with shortened URL's from sites such as bit.ly. Howe

  • How to prevent access to certain URL requested pages? 2009-06-06

    How to prevent access to certain URL requested pages? If i have form.html, processFrom.php and getResults.php in my webapp root, even though processFrom.php does not echo any content, how can i prevent the user from accessing this file by typing in t

  • Determine Final Destination of a Shortened URL 2009-07-10

    I'm trying to find the best way (in code) to determine the final destination of a shortened URL. For instance http://tinyurl.com redirects to an eBay auction. I'm trying to get the URL for the eBay auction. I'm trying to do this from within .NET so I

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.165 (s). 11 q(s)