我正在尝试获取vtu API的内容,但无法正常工作,我尝试使用file_get_content()无济于事,我也尝试了curl

时间:2019-06-26 17:50:47

标签: php

我正在尝试获取远程网页内容,但是我无法使用 file_get_content和cur

我尝试从localhost触发它,它工作正常,但是从 实时服务器仍然需要整整一天

//API configurations
$APIuserID = '07062454018';
$APIkey = '2x1ec5d04f8d3db8f71xc0d';
// --END---

this is the url i am trying to get the content from

$url = "https://mobileairtimeng.com/httpapi/?  
userid=".$APIuserID."
&pass=".$APIkey."&network=".$network."
&phone=".$recepientPhone."&amt=".$amount."&jsn=json";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
$body=curl_close($ch);
$obj = json_decode($output,true);

0 个答案:

没有答案