API图片多数据GET调用

远梦 832 0
做个笔记备用
<?php 
{
	if($_GET["sort"] == '分类名1'){
		$imgurl = '跳转链接';
	}	
	elseif($_GET["sort"] == '分类名2'){
	    $imgurl = '跳转链接';
	}
	elseif($_GET["sort"] == '分类名3'){
	    $imgurl = '跳转链接';
	}
}
    header("Location:".$imgurl);//跳转输出图片    
?>

调用示列

https://api.qoc.cc/api/img?sort=meizipro

https://api.qoc.cc/api/img?sort=xiezhen

https://api.qoc.cc/api/img?sort=luoli

发表评论 取消回复
表情 图片 链接 代码

分享