線上短地址轉換聚合工具-toolfk程式設計師線上工具網
阿新 • • 發佈:2018-12-01
本文要推薦的[ToolFk]是一款程式設計師經常使用的線上免費測試工具箱,ToolFk 特色是專注於程式設計師日常的開發工具,不用安裝任何軟體,只要把內容貼上按一個執行按鈕,就能獲取到想要的內容結果。ToolFk還支援 BarCode條形碼線上生成、 QueryList採集器、 PHP程式碼線上執行、 PHP混淆、加密、解密、 Python程式碼線上執行、JavaScript線上執行、YAML格式化工具、HTTP模擬查詢工具、HTML線上工具箱、JavaScript線上工具箱、CSS線上工具箱、JSON線上工具箱
網站名稱:ToolFk
網站鏈結:https://www.toolfk.com/
工具連結:https://www.toolfk.com/tool-short-url
程式碼教學
本工具[線上短連結生成縮短服務工具]依賴的百度短連結、新浪短連結和Shorte短連結平臺
STEP 1
STEP 2
核心程式碼如下
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']; }
值得一試的三個理由:
-
整合各種程式設計師開發中經常使用的開發測試工具。
-
簡潔美觀大氣的網站頁面
-
支援 線上格式化執行程式碼、APK線上反編譯、線上高強度密碼生成、線上網頁截圖 等二十多種工具服務
-
同時還推薦一下它的姐妹網 www.videofk.com 視訊下載工具箱