2014-03-02 4 views
0

에 나는 (제거 게시자 ID, 참고) 사실에서 샘플 API를 사용하고 있습니다 : http://api.indeed.com/ads/apisearch?publisher=ID&q=java&l=austin%2C+tx&sort=&radius=&st=&jt=&start=&limit=&fromage=&filter=&latlong=1&co=us&chnl=&userip=1.2.3.4&useragent=Mozilla/%2F4.0%28Firefox%29&v=2실제로 API는 로컬 호스트에서 작동하지만 라이브 서버

그것은 simplexml_load_file를 사용하여 로컬 호스트에서 작동합니다. 하지만 라이브 서버에서 테스트 할 때 false를 반환합니다. 뭐가 문제 야? https://ads.indeed.com/jobroll/xmlfeed

ini_set('allow_url_fopen ','ON'); 

$xml = simplexml_load_file("http://api.indeed.com/ads/apisearch?publisher=ID&q=java&l=austin%2C+tx&sort=&radius=&st=&jt=&start=&limit=&fromage=&filter=&latlong=1&co=us&chnl=&userip=1.2.3.4&useragent=Mozilla/%2F4.0%28Firefox%29&v=2"); 

var_dump($xml); 
+0

라이브 서버에서 'simplexml'을 사용할 수 있습니까? – pes502

+0

웹 서버에서'ini_set ('allow_url_fopen', 'ON');을 설정할 권리가 없을 수도 있습니다. –

+0

ini_set ('allow_url_fopen', 'ON') 없이도 작동하지 않습니다. BTW, 나는 호스트에 Fatcow를 사용하고 있습니다. – user10132

답변

0

내가 내 호스트, Fatcow를 연락하여이 문제를 해결, 그들은 내가은 phpinfo 파일을 편집 할 수있는 링크를했다 :

이는 API의 문서입니다. allow_url_fopen을 켜면 문제가 해결되었습니다.

관련 문제