【问题标题】:How to modify whois contact details?如何修改whois联系方式?
【发布时间】:2012-03-12 06:32:16
【问题描述】:
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

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

【问题讨论】:

  • 我无法接受答案,因为我的声望低于 15
  • 那是错误的。你需要 15 个代表来upvote,而不是 accept。点击投票按钮下方的复选标记图标。

标签: php api file-get-contents


【解决方案1】:

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

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

【讨论】:

  • 我用过这个链接,尝试修改whois联系方式....manage.resellerclub.com/kb/answer/791
  • 请仔细阅读该页面:HTTP Method: POST。除此之外,现在开始接受一些答案!
【解决方案2】:

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

【讨论】:

  • 我从您的问题中复制了它,请确保您粘贴的行与您的代码中完全相同。
猜你喜欢
  • 2012-02-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-06-16
  • 1970-01-01
  • 2021-02-13
相关资源
最近更新 更多