url-shortener

Is there any gem/plugin available to create your own url shortener service using ruby on rails

扶醉桌前 提交于 2019-12-11 01:44:56
问题 I want to create a service for url shorten for my own project.Basically I am sending some information via sms, so thats why I need to shorten the URL. I don't want to use google url shortner or some other services available. We want to have our own custom url shortner. Is there any gem or plugin available for this for rails, something like this short_url = plugin_function_with_some_configurations(long_url) long_url = plugin_function_with_some_configurations(short_url) as from google search i

AWS signed URL too long to shorten

╄→尐↘猪︶ㄣ 提交于 2019-12-10 11:45:55
问题 I am creating a signed URL with AWS so I can safely pass this URL to another API for temporary use. The signed URL points to a S3 resource. The problem is the other API does not accept such long links. Therefore I am trying to shorten it. I tried to use shorteners like goo.gl or bit.ly to no avail because the URL was too long for them. I even built my own private shortener with AWS (AWS url shortener) but it had the same problem: "The length of website redirect location cannot exceed 2,048

How to un-shorten (resolve) a url using python, when final url is https?

旧时模样 提交于 2019-12-09 23:46:03
问题 I am looking to unshorten (resolve) a url in python, when the final urls are https. I have seen the question: How can I un-shorten a URL using python? (as well as similar others) , however as noted in the comment to the accepted answer, this solution only works when the urls is not redirected to https. For reference, the code in that question (which works fine when redirecting to http urls) is: # This is for Py2k. For Py3k, use http.client and urllib.parse instead, and # use // instead of /

Is it possible to generate custom bit.ly URLs through their API?

一个人想着一个人 提交于 2019-12-09 12:43:11
问题 I would like to be able to generate custom bit.lys ( http://bit.ly/thecakeisalie type things) through their API. This does not appear to be possible, but I thought I'd check; does anyone happen to know otherwise? 回答1: It was removed from the API. I like many others were trying to do this and bit.ly's support email replied saying it has been removed. Similar experiences on their ApiDocumentation wiki here. 回答2: This unfortunately had to be removed for our free users due to on-going abuse. All

How do I get the final, redirected, canonical URL of a website using PHP?

孤者浪人 提交于 2019-12-09 05:23:06
问题 In the days of link shorteners and Ajax, there can be many links that ultimately point to the same content. I was wondering what the best way is to get the final, best link for a web site in PHP, hopefully with a library. I was unable to find anything on Google or GitHub. I have seen this example code, but it doesn't handle things like a rel="canonical" meta tags or default ssl ports: http://w-shadow.com/blog/2008/07/05/how-to-get-redirect-url-in-php/ Facebook seems to handle this pretty well

What's a good URL shortening script? [closed]

旧城冷巷雨未停 提交于 2019-12-08 10:12:01
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . What's a good URL shortening script that does the following things? It is customizable (HTML and CSS) Users can create accounts Users can delete shortened URLs There is a bookmarklet Users can set privacy codes Some sort of API (so Twitter clients could use it, etc.) Thanks a document.write(Math.random()*Math

Using the UrlShortener API in a custom Spreadsheet function

假装没事ソ 提交于 2019-12-08 03:12:13
问题 I would like to use an API (url shortener) with a public google Add-on. For the moment my code returns: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup. Is this possible? If yes, Do I need an authentification Token? If yes, what key type should I choose? How can I implement the authorisation for this kind of use? Do I need to pay for it? If no, How could other add-ons use external APIs Thanks a lot for your answers, 回答1: EDIT: The OP pointed out in the comments

How to get the complete URL address most efficiently?

穿精又带淫゛_ 提交于 2019-12-07 20:23:04
问题 I'm using a Java program to get expanded URLs from short URLs. Given a Java URLConnection , among the two approaches, which one is better to get the desired result? Connection.getHeaderField("Location"); vs Connection.getURL(); I guess both of them give the same output. The first approach did not give me the best results, only 1 out of 7 were resolved. Can the efficiency be increased by the second approach? Can we use any other better approach? 回答1: I'd use the following: @Test public void

Regex / php code to check if a URL is a short URL

╄→尐↘猪︶ㄣ 提交于 2019-12-07 12:23:14
问题 I am attempting to create a php function which will check if the passes URL is a short URL. Something like this: /** * Check if a URL is a short URL * * @param string $url * return bool */ function _is_short_url($url){ // Code goes here } I know that a simpler and a sure shot way would be to check a 301 redirect, but this function aims at saving an external request just for checking. Neither should the function check against a list of URL shortners as that would be a less scale-able approach.

Regex / php code to check if a URL is a short URL

99封情书 提交于 2019-12-06 02:58:45
I am attempting to create a php function which will check if the passes URL is a short URL. Something like this: /** * Check if a URL is a short URL * * @param string $url * return bool */ function _is_short_url($url){ // Code goes here } I know that a simpler and a sure shot way would be to check a 301 redirect, but this function aims at saving an external request just for checking. Neither should the function check against a list of URL shortners as that would be a less scale-able approach. So are a few possible checks I was thinking: Overall URL length - May be a max of 30 charecters URL