php处理get请求,返回json

  1. <?php    
  2.     $searchUrl = 'http://203.156.244.227:80/cgi-bin/get_score.fcgi?content=';    
  3.     if(!empty($_GET['content']))    
  4.     {    
  5.         $searchUrl .= $_GET['content'];    
  6.     }    
  7.     echo file_get_contents($searchUrl);    
  8. ?>  

猜你喜欢

转载自blog.csdn.net/young_gao/article/details/80193921