PHP 获取网上文件内容

时间:2023-03-08 19:46:40
PHP 获取网上文件内容
<?php
$ch = curl_init("http://game.qq.com/comm-htdocs/js/game_area/moba_server_select.js");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$str = curl_exec($ch);
if ($str !== false) {
// do something with the content
echo $str;
}
curl_close($ch);

程序猿必读