php向特定URL发送数据,并接收,如何实现

解决方案 »

  1.   

    接口  或者直接file或者file_get_contents()都可以实现http://www.baidu.com/s?wd=php
    访问百度,发送wd=php,接收返回   这个不就是嘛
      

  2.   

    同意
    $url="http://www.example.com/parma=***";
    $contents=file_get_contents($url);
      

  3.   

    支持2楼,用 curl 比较好。如果不会,建议参考Discuz的 dfsockopen 函数,可以发送可以接收