0
내 사이트에 curreny 코드를 사용하고 있습니다. 줄내 사이트에서 fsockopen을 어떻게 사용할 수 있습니까?
<?php
$contents = file_get_contents('http://www.tcmb.gov.tr/kurlar/today.html');
$contents = iconv("windows-1254" , "utf8" , $contents);
$dollar = preg_match('~ABD DOLARI\s+(.+?)\s+(.+?)\s+~i', $contents, $matches) ? array('buying' => $matches[1], 'selling' => $matches[2]) : '';
$euro = preg_match('~EURO\s+(.+?)\s+(.+?)\s+~i', $contents, $matches) ? array('buying' => $matches[1], 'selling' => $matches[2]) : '';
$gbp = preg_match('~İNGİLİZ STERLİNİ\s+(.+?)\s+(.+?)\s+~i', $contents, $matches) ? array('buying' => $matches[1], 'selling' => $matches[2]) : '';
$chf = preg_match('~İSVİÇRE FRANGI\s+(.+?)\s+(.+?)\s+~i', $contents, $matches) ? array('buying' => $matches[1], 'selling' => $matches[2]) : '';
echo '
<table class="form" style="background:#fff;width:300px;margin-left:14px;">
<tr style="border-bottom:1px solid #e4e4e4;">
..
을하지만 오늘 내 사이트가 오류 : 다음으로
Warning: eval() (/var/www/vhosts/mysite.com/httpdocs/modules/php/php.module(80) : eval()'d code dosyasının 2 satırı) içinde file_get_contents() [function.file-get-contents]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0.
나는이 문제에 대해 지원을 호스팅에 내 부탁 않았고, 그들이 말하는됩니다
"사용하지 마십시오 fopen 옵션을 사용하십시오. 'fsockopen'을 사용하십시오. "하지만 어떻게 할 수 있을지 모르겠습니다.
나를 도와주세요. 감사.
내가 코드에서 변경할 수있는 모르겠어요 거기 변경에서? – user1750573
'fsockopen '을 사용하는 것은 좋은 해결책이 아닙니다 **. 대신 컬을 사용하십시오. url_fopen_wrappers는 url_fopen_wrappers가 URL 포함이 비활성화되어있는 한 완벽하게 안전하다는 것을 호스팅 회사에 알리고 싶을 수도 있습니다. – ThiefMaster
편집증에 의한 보안이 다시 공격합니다! –