ToolFk is a free test kit that programmers use online. ToolFk focuses on the tools that programmers use every day. You don’t need to install any software, just paste the content and press the execute button to get the results you want. ToolFk also supports BarCode BarCode generation online, QueryList collector, PHP code running online, PHP obfuscation, encryption, decryption, Python code online running, JavaScript online running, YAML Formatting Tool, HTTP simulation query tool, HTML online toolbox, JavaScript online toolbox, CSS online toolbox, JSON online toolbox, Unixtime timestamp conversion, Base64/URL/N Ative2Ascii conversion, CSV conversion toolbox, XML online toolbox, WebSocket online tool, Markdown online toolbox, Htaccess2nginx Conversion, base online conversion, online encryption toolbox, online pseudo-original tool, online APK decompile, online webpage screenshot tool, online random password generation, online Qrcode Qrcode generation, online Crontab expression generation, online short url generation, online calculator tool. Such as more than 20 daily programmer development tools, is a very comprehensive programmer toolbox site.
Site name: ToolFk Site Link: www.toolfk.com/ Tool link: www.toolfk.com/tool-short-…
The code of teaching
This tool [online short link generation shortening service tool] relies on Baidu short link, Sina short link and Shorte short link platform
STEP 1
STEP 2
The core code is as follows
if($type= ="sina") {$sina_url = 'http://api.t.sina.com.cn/short_url/shorten.json?source=3271760578&url_long='.$url;
$short_url = @current(\App\Helper\UtilsHelper::curlGet($sina_url))"url_short"];
}else if($type= ="baidu") {$baidu_url = "https://dwz.cn/admin/create";
$res = \App\Helper\UtilsHelper::curlPost(\App\Helper\UtilsHelper::jsonEncode([
"url"= >$url
]),$baidu_url.true);
$short_url = @$res['ShortUrl'];
}else{
$shortener_url = "https://shorte.st/shortener/shorten";
$res = \App\Helper\UtilsHelper::curlPost([
"url"= >$url].$shortener_url.true);
$short_url = @$res['shortenedUrl'];
}Copy the code
Three reasons it’s worth a try:
-
Integrate a variety of development test tools commonly used in programmer development.
-
Simple and beautiful atmosphere of the website page
-
Support online formatting execution code, APK online decompilation, online high-strength password generation, online web page screenshots and more than 20 tool services
-
Also recommend its sister network www.videofk.com video download toolbox
This paper links: www.hihubs.com/article/384