2011-02-06 61 views
0

我有一個要求輸入電子郵件和城市的表單。城市選擇還將頁面重定向到網站的/ examplecity部分。然後處理電子郵件,並向用戶發送一個確認。如果用戶已存在,頁面將重定向到錯誤頁面。表單提交時發生捲曲壓縮錯誤

任何想法如何抑制錯誤頁面,只是繼續前進?我嘗試了幾個捲曲選​​項,但沒有結果。

這是我的代碼。

//form 
$Curl_Session = curl_init('http://alist-manage.com/subscribe/post?u=08fd07d8be6c7c671&id=960c347'); 
curl_setopt ($Curl_Session, CURLOPT_POST, 1); 
curl_setopt($Curl_Session, CURLOPT_NOSIGNAL, TRUE); 
curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, "&group=$group&MERGE0=$email"); 
// 
//curl_setopt ($Curl_Session, CURLOPT_FOLLOWLOCATION, 1); 
curl_exec ($Curl_Session); 
curl_close ($Curl_Session); 
setcookie("city", $city, time()+604800); // cookie expires in 7 days. 
header("Location: http://site.ca/".$city.""); 
exit(); 

回答

2

好,所以http://www.alist.com/頁面重定向到一個錯誤頁面,如果用戶不存在,你希望它直奔http://site.ca/頁面?

嘗試添加此:

curl_setopt($Curl_Session,CURLOPT_RETURNTRANSFER,true); 
+0

我可以請你喝啤酒!我試過我不知道有多少個不同的選項.... – mrlayance 2011-02-06 00:22:08