如何修改whois的联系方式?

时间:2012-03-12 06:32:17

标签: php api file-get-contents

function modify(.......)
{
  $mcontact = file_get_contents( "https://test.httpapi.com/api/contacts/modify.json?auth-userid=$uid&auth-password=$pass&contact-id=$cid&name=$name &company=$company&email=$email&address-line-1=$street&city=$city&country=$country&zipcode=$pincode&phone-cc=$countryCodeList[$phc]&phone=$phone" );

  $mdetails = json_decode( $mcontact, true );

  return $mdetails;
}

使用此修改功能,显示警告消息

Warning: file_get_contents(https://...@hihfg.com&address-line-1=3,dfgdf,fgdf&city=dfgfd&country=India&zipcode=641005&phone-cc=91&phone=756657) 
  [function.file-get-contents]: failed to open stream: HTTP request failed!
  HTTP/1.0 400 Bad request in /home/gfdgfd/public_html/new_one/customer/account/class.whois.php
  on line 49

请帮帮我,修改联系方式..

2 个答案:

答案 0 :(得分:0)

HTTP/1.0 400 Bad request - 您需要知道的一切:您正在发送服务器不喜欢的请求。

您确定它接受GET请求并且不需要POST吗?网址是否正确?

答案 1 :(得分:0)

您的网址错误。您还有一个空格字符:&name=$name &company=$company。删除它。