简体   繁体   English

将数据发布到网站表单卷曲

[英]Post Data to Website Form Curl

I am trying to print the data of this page in a array in php, but post the right fields. 我试图在php数组中打印此页面的数据,但发布正确的字段。

Basically i need to submit the data for 2010/2011 and Division Two (Men), I dont know where im going wrong? 基本上我需要提交2010/2011年和第二分区(男子)的数据,我不知道即时通讯在哪里出错?

      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, "http://www.englandbasketball.co.uk/leaguetables/default.aspx");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_POST, true);

      $data = array(
     'ddlStartYear' => '2011',
     'ddlCompetitionGroups' => '540'
 );

      curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
      $output = curl_exec($ch);
      $info = curl_getinfo($ch);
      curl_close($ch);

      print ($info);

Thanks 谢谢

You want to submit form with your information (2010/2011) and want to get result in array. 您想要提交包含您的信息的表单(2010/2011),并想获得数组中的结果。 If i am right them you should use SOAP. 如果我对,那么您应该使用SOAP。 and there should be a function to handle your data to proceed them. 并且应该有一个函数来处理您的数据以进行处理。

Please read this 请阅读这个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM