为 SQL 数据库动态生成短 URL?

编程入门 行业动态 更新时间:2024-10-14 10:44:17
本文介绍了为 SQL 数据库动态生成短 URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的客户拥有超过 400,000 名客户的数据库.每个客户都分配了一个 GUID.他希望我选择所有记录,创建一个包含此 GUID 作为参数的动态短 URL".然后将此短网址保存到每个客户记录的字段中.

My client has database of over 400,000 customers. Each customer is assigned a GUID. He wants me to select all the records, create a dynamic "short URL" which includes this GUID as a parameter. Then save this short url to a field on each clients record.

我的第一个问题是,是否有任何网址缩短网站允许您像这样以编程方式即时创建短网址?

The first question I have is do any of the URL shortening sites allow you to programatically create short urls on the fly like this?

推荐答案

TinyUrl 允许你这样做(没有被广泛记录),例如:

TinyUrl allow you to do it (not widely documented), for example:

tinyurl/api-create.php?url=www.stackoverflow/

变成tinyurl/6fqmtu

所以你可以有

tinyurl/api-create.php?url=mysite/user/xxxx-xxxx-xxxx-xxxx

到tinyurl/64dva66.

guid 并没有那么清楚,但 URL 应该是唯一的

The guid doesn't end up being that clear, but the URLs should be unique

请注意,您必须通过 HTTPWebRequest 传递它并获得响应.

Note that you'd have to pass this through an HTTPWebRequest and get the response.

更多推荐

为 SQL 数据库动态生成短 URL?

本文发布于:2023-07-15 13:02:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1111382.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据库   动态   SQL   URL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!