Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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;`
like image 327
Abhay Avatar asked Nov 23 '25 04:11

Abhay


1 Answers

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).

like image 122
Quentin Avatar answered Nov 24 '25 20:11

Quentin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!