2017-04-27 67 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非常感谢您对您的帮助球员。