我在我的网站上使用货币代码。具有以下内容:
<?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'” 但我不知道我该怎么做?
请帮助我。谢谢。