2012-03-12 43 views
0
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; 
} 

此修改功能,顯示警告mesage 如何修改whois聯繫信息?使用

Warning: file_get_contents(https://[email protected]&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 

請幫助我,修改聯繫方式..

+0

我不能接受的答案,因爲我有小於15聲譽 – Vaishu 2012-04-10 11:53:42

+0

這是絕對錯誤的。你需要15代表* upvote *,而不是*接受*。點擊投票按鈕下方的複選標記圖標。 – ThiefMaster 2012-04-10 16:16:35

回答

0

HTTP/1.0 400 Bad request - 所有你需要知道:你發送請求的服務器沒有按不喜歡。

您確定它接受GET請求並且不需要POST嗎?網址是否正確?

+0

我已經使用此鏈接,嘗試修改whois聯繫方式.... http://manage.resellerclub.com/kb/answer/791 – Vaishu 2012-03-12 06:40:04

+2

請仔細閱讀該頁面:'HTTP Method:POST'。除此之外,現在開始接受一些答案**! – ThiefMaster 2012-03-12 06:41:56

+0

確定..我會盡量 – Vaishu 2012-03-12 06:50:53

0

您的網址錯誤。您有一個額外的空格字符:&name=$name &company=$company。去掉它。

+0

網址中沒有空格.. – Vaishu 2012-03-12 06:55:45

+1

我從你的問題複製它來修改「POST」的方法,確保您粘貼一模一樣線在你的代碼。 – maialithar 2012-03-12 06:58:15