php教程

  • PHP获取QQ用户昵称+头像API接口代码

    如果要获得QQ用户的头像和昵称,需要在腾讯开放平台申请API接入才可以,但是这个不需要!只需要输入用户的正确的QQ号即可返回用户的头像和昵称。API接口代码<?php // 通过QQ号即可获取用户信息 // 获取QQ头像接口// http://q1.qlogo.cn/g?b=qq&nk=QQ号&s=...

  • php破解图床防盗链方法

    PHP代码命名为dl.php<?phpclass ImgBridge{private $water=&#39;&#39;;private $imgUrl=&#39;&#39;;private $referer=&#39;&#39;;private $ua=&#39;MQQBrowser/26 Mozilla/5.0 (Linux; U; Android 2.3.7; zh-cn; MB200 Build/GRJ22; CyanogenMod-7...

  • 百度编辑器上传word转html

    后台上传word转html到编辑器中,编辑器是使用的百度编辑器,先在页面合适的位置写个上传框<button type=”button” name=”fileword” id=”upload-fileword”>上传word文件</button>前端用的layui框架,不需要写提示框,图个方便,大家自行选择<script>layui...

  • php联通查话费API接口源码

    API接口源码<?php$url="https://weixin.10010js.com/app/charge/qryRealFee";$data=&#39;{"phone":&#39;.&#39;"&#39;.$_GET["phone"].&#39;"}&#39;;echo "您的帐户余额是:<font color=red size=30>&quot...

  • PHP生成sitemap网站地图代码

    网站地图生成代码<?php$dom = new DOMDocument("1.0", "utf-8");header("Content-Type: text/xml");$root = $dom->createElement("urlset");$dom->appendChild($root);for ($i = 0; $i <= 998; $i++) {$track = $dom->create...

  • PHP操作TXT写入读取清空方法

    PHP写入TXT<?php$hua = "这是我要写入的一段话";$filename = &#39;name.txt&#39;;$handle =fopen($filename,&#39;a&#39;); fwrite($handle,$hua); fclose($handele);?>PHP读取TXT内容-----第一种方法-----fopen+fread--------<?php$file_path = "te...

  • PHP写入TXT文本方法

    <?$url = $_GET[&#39;url&#39;];$file = "url.txt";$handle =fopen($file,&#39;a&#39;); fwrite($handle,""); fwrite($handle,"URL:");fwrite($handle,"$url"); fclose($handele);header("location: $url&q...

  • ICP备案信息查询API接口

    api接口代码<?phpheader("Access-Control-Allow-Origin:*");header("Access-Control-Allow-Methods:GET");header("Access-Control-Allow-Headers:x-requested-with,content-type");header("Content-Type:text/html,application/json; char...

  • PHP截取字符前后面的字符串

    截取字符后面的内容 strripos函数获取&字符串后面的内容$number = &#39;1111&0123456&#39;;$result = substr($number,strripos($number,"&")+1);echo $result;输出0123456截取字符前面的内容strripos函数获取&字符串前面的内容$test = &#39;1111&0...

    733年前
  • PHP过滤HTML标签代码方法

    过滤指定标签大全$str=preg_replace("/\s+/", " ", $str); //过滤多余回车$str=preg_replace("/<[ ]+/si","<",$str); //过滤<__("<"号后面带空格)$str=preg_replace("/<\!--.*?-->/si","",$str); //注释$...

«上一页第(19/33)页下一页»