首页 »  API接口 »  图片API »  文字图标API

文字图标API

浏览次数:36 次
📖 API文档
🧪 在线测试
⚠️ 错误码
💻 示例代码
接口地址
https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff
请求方式
GET
返回格式
JSON
接口状态
正常 (HTTP 200) 上次检测:2026-05-19 13:39:10
更新时间
2026-05-05 21:55:07
📝 接口描述
文字图标API - 输出SVG格式
📋 请求示例
【基础请求】
GET https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff

【请求头】
Content-Type: application/json
Accept: application/json

【参数说明】
GET请求参数通过URL传递:
https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff?参数名1=参数值1&参数名2=参数值2

【调用示例】

# cURL
curl -X GET 'https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff' \
  -H 'Content-Type: application/json'

# JavaScript (Fetch)
fetch('https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff', {
    method: 'GET',
    headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data));

# PHP (cURL)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>

# Python (requests)
import requests
url = 'https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff'
response = requests.get(url)
print(response.json())
📤 真实返回示例
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" width="64px" height="64px" viewBox="0 0 64 64" version="1.1">
    <rect width="64" height="64" fill="#667eea"/>    <text x="50%" y="50%" 
          style="color: #fff; line-height: 1; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;" 
          alignment-baseline="middle" 
          text-anchor="middle" 
          font-size="28" 
          font-weight="bold" 
          dy=".1em" 
          dominant-baseline="middle" 
          fill="#fff">创新</text>
</svg>
📌 请求参数 (键值对)
📊 返回结果
点击"发起请求"查看返回数据
错误码说明
200请求成功
400请求参数错误
401未授权访问
403禁止访问
404接口不存在
500服务器内部错误
🔧 JavaScript (Fetch)
fetch('/api/proxy.php?url=https%3A%2F%2Fwww.chuangxinwu.cn%2Fpublic%2Fapi%2Ftexticon.php%3Fname%3D%E5%88%9B%E6%96%B0%E5%B1%8Bsize%3D120%26background%3D667eea%26color%3Dfff', {
    method: 'GET',
    headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
🐘 PHP (cURL)
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
📡 Python (requests)
import requests
url = 'https://www.chuangxinwu.cn/public/api/texticon.php?name=创新屋size=120&background=667eea&color=fff'
response = requests.request('GET', url)
print(response.json())

同类推荐

🔥 同分类下热门接口