2017-04-27 80 views
0

我正在試圖做一個curl請求,如下所示。超時/顯示空白頁面之前,頁面需要很長時間才能加載。PHP CURL不能在8080上工作

<?php 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_VERBOSE, 1); 
curl_setopt($ch, CURLOPT_PORT, 8080); 
curl_setopt($ch, CURLOPT_URL,'http1.uk.*******.com/ASM_Relay?Username=****&Password=****&Channel=UK%2EO2&MSISDN=447595344329&Content=HelloWorld'); 
$content = curl_exec($ch); 
echo $content; 
?> 

但是如果該URL直接發生在我的瀏覽器,它返回預期的響應。

http1.uk.*******.com:8080/ASM_Relay?Username=******&Password=*****&Channel=UK%2EO2&MSISDN=44759533229&Content=HelloWorld

我花了很多年試圖找出原因,但我處於全面損失。

任何幫助非常讚賞

+1

??? 'curl_setopt($ ch,CURLOPT_PORT,8088);''8088!== 8080' – RiggsFolly

+0

嗨,很抱歉,當我提出問題時,這是一個錯字,它在更正時仍然不起作用。 – MattBlack

+2

請複製/粘貼您的_actual code_。不要將它改寫爲SO,因爲它是時間_impossible_幫助我們找到潛在的錯誤和錯別字...... –

回答

0

我說話有人在主機支持其他人,原來他們被阻止8080非常感謝您對您的幫助球員。