<?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);