Hi I'm doing a website which contains several radios. I need to know, through javascript, if a radio stream url is working or not. I achieve this in PHP doing a file_get_contents($radio_source, false, NULL, -1, 600);
, doing this I know that if the request reached the limit (600) then the request is alive, otherwise, not. My question is: Does exist a way to do this in Javascript?. So far, $.ajax doesn't seems to be an option, because doesn't have any parameter to help me to achieve this.
使用Javascript检查无线电流媒体网址是否正常工作
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- donglu8334 2015-06-05 17:53关注
You can use this cool function built for javascript: https://github.com/kvz/phpjs/blob/master/functions/filesystem/file_get_contents.js . That uses XMLHttpRequest
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 对于相关问题的求解与代码
- ¥15 ubuntu子系统密码忘记
- ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
- ¥15 保护模式-系统加载-段寄存器
- ¥15 电脑桌面设定一个区域禁止鼠标操作
- ¥15 求NPF226060磁芯的详细资料
- ¥15 使用R语言marginaleffects包进行边际效应图绘制
- ¥20 usb设备兼容性问题
- ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
- ¥15 安装svn网络有问题怎么办