php - file_get_contents 并删除特殊字符
问题描述
<?php
$streamSite = "http://testsite.com/token.php";
function writeFile($url, $channel) {
$File = $channel.".strm";
$Handle = fopen($File, 'w');
fwrite($Handle, $url);
fclose($Handle);
}
$input = @file_get_contents($streamSite) or die("Please try again later: $url");
preg_match('/(m3u8.*hdnea=.*acl=.*~hmac=.*)/', $input, $matches);
echo $matches[1];
?>
;
输出,但由于这个原因它不起作用'); 谁能帮我删除这个'); 形成下面的 outfile 链接。谢谢 https://test.com/i/xxxx/master.m3u8hdnea=st=xxxxx~exp=xxxxxx~acl=/ *~hmac=xxxxxx');
解决方案
推荐阅读
- java - Javascript Huffman 解码器/翻译方法之前工作,但现在导致 NullPointerException
- php - Cakephp:时间,差异没有按预期工作
- sql - 动态sql查询中的连接问题
- c# - 灰显某些项目 C#
- c# - 重新加载实时图表图表只会添加新数据
- c# - 分页样式搞砸了
- node.js - oAuth 2.0 access token validation node.js
- c# - 不区分大小写的 List.Contains():方法“包含”没有重载需要 2 个参数
- django - 获取属性错误:模块'matplotlib.pyplot'没有属性'canvas'
- javascript - GraphQL:在文件上传期间解决承诺时出错