$result=file_get_contents("http://www.163.com"); get方法
//$result = GetFileRow("http://localhost/1.txt");
echo $result;
return;

解决方案 »

  1.   

    file_get_contents("http://www.aaa.com/aa.htm?test=bbb");
    这样就行了
      

  2.   

    呀。你真是太浪费分数了。我现在拼命回复只因我当初也是为同样的问题送人100分。http://community.csdn.net/Expert/TopicView.asp?id=4220726
      

  3.   

    <?php
    //用这个也行
    $r=new HTTPRequest("http://www.aaa.com/aa.htm?test=bbb","GET");
    /**
     * @author:love01px增加POST功能
     * 支持GET | POST 
     *  HTTP | HTTPS
     */
    class HTTPRequest
    {
     var $mArray=array("GET","POST");
       var $_fp;        // HTTP socket
       var $_url;        // full URL
       var $_host;        // HTTP host
       var $_protocol;    // protocol (HTTP/HTTPS)
       var $_uri;        // request URI
       var $_method;        // method
       var $_query;        // query   
       var $_port;        // port
       
       // scan url
       function _scan_url()
       {
           $req = $this->_url;
           
           $pos = strpos($req, '://');
           $this->_protocol = strtolower(substr($req, 0, $pos));
           
           $req = substr($req, $pos+3);
           $pos = strpos($req, '/');
           if($pos === false)
               $pos = strlen($req);
           $host = substr($req, 0, $pos);
           
           if(strpos($host, ':') !== false)
           {
               list($this->_host, $this->_port) = explode(':', $host);
           }
           else 
           {
               $this->_host = $host;
               $this->_port = ($this->_protocol == 'https') ? 443 : 80;
           }
           
           $this->_uri = substr($req, $pos);
           if($this->_uri == '')
               $this->_uri = '/';
       }
       
       // constructor
       function HTTPRequest($url,$method="GET",$query="")
       {
          $this->_method=(in_array($method,$this->mArray))?$method:"GET";
           $this->_url = $url;
           $this->_query = $query;
           $this->_scan_url();
       }
       
       // download URL to string
       function DownloadToString()
       {
           $crlf = "\r\n";
           
           // generate request
           $req = $this->_method ." ". $this->_uri . ' HTTP/1.0' . $crlf
               .    'Host: ' . $this->_host . $crlf.(($this->_method=="POST")?("Content-type: application/x-www-form-urlencoded\r\nUser-Agent: Mozilla 4.0\r\nContent-length: ".strlen($this->_query)."\r\nAccept: */*\r\n\r\n$this->_query".$crlf.$crlf):$crlf);
           // fetch
           $this->_fp = fsockopen(($this->_protocol == 'https' ? 'ssl://' : '') . $this->_host, $this->_port, $errno, $errstr, 30);
           fwrite($this->_fp, $req);
           while(is_resource($this->_fp) && $this->_fp && !feof($this->_fp))
               $response .= fread($this->_fp, 1024);
           fclose($this->_fp);
           
           // split header and body
           $pos = strpos($response, $crlf . $crlf);
           if($pos === false)
               return($response);
           $header = substr($response, 0, $pos);
           $body = substr($response, $pos + 2 * strlen($crlf));
           
           // parse headers
           $headers = array();
           $lines = explode($crlf, $header);
           foreach($lines as $line)
               if(($pos = strpos($line, ':')) !== false)
                   $headers[strtolower(trim(substr($line, 0, $pos)))] = trim(substr($line, $pos+1));
           
           // redirection?
           if(isset($headers['location']))
           {
               $http = new HTTPRequest($headers['location']);
               return($http->DownloadToString($http));
           }
           else 
           {
               return($body);
           }
       }
    }
    ?>
      

  4.   

    用js的window.open()不行吗?可以新开窗口或是向已打开的窗口传递参数
      

  5.   

    echo "window.open('http://www.aaa.com/aa.htm?test=bbb')";
      

  6.   

    <?php
    $fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
    if (!$fp) {
        echo "$errstr ($errno)<br />\n";
    } else {
        $out = "GET / HTTP/1.1\r\n";
        $out .= "Host: www.example.com\r\n";
        $out .= "Connection: Close\r\n\r\n";    fwrite($fp, $out);
        while (!feof($fp)) {
            echo fgets($fp, 128);
        }
        fclose($fp);
    }
    ?>