Hello everyone, first of all, I apologize to everyone for translation errors
I started doing research to extract data from websites and found some documents and run them on my local host, then I uploaded the code to my server, but the data did not come
pkgs:
nginx-1.20.0_1,2
php80-8.0.6
my website code:
thanks in advance for your help
I started doing research to extract data from websites and found some documents and run them on my local host, then I uploaded the code to my server, but the data did not come
pkgs:
nginx-1.20.0_1,2
php80-8.0.6
my website code:
Code:
<?php
function getir($baslangic, $son, $cekilmek_istenen)
{
@preg_match_all('/' . preg_quote($baslangic, '/') .
'(.*?)'. preg_quote($son, '/').'/i', $cekilmek_istenen, $m);
return @$m[1];
}
//Ankr Coin
$url = "https://coinmarketcap.com/currencies/ankr/";
$icerik = file_get_contents($url);
$AnkrCoin = getir('<div class="priceValue___11gHJ">','</div>',$icerik);
//Eose
$url = "https://coinmarketcap.com/currencies/eos/";
$icerik = file_get_contents($url);
$EosCoin = getir('<div class="priceValue___11gHJ">','</div>',$icerik);
//Atom
$url = "https://coinmarketcap.com/currencies/cosmos/";
$icerik = file_get_contents($url);
$CosmosAtom = getir('<div class="priceValue___11gHJ">','</div>',$icerik);
//Mkr
$url = "https://coinmarketcap.com/currencies/maker/";
$icerik = file_get_contents($url);
$Mkr = getir('<div class="priceValue___11gHJ">','</div>',$icerik);
?>
<html>
<head>
<meta http-equiv="refresh" content="5">
</head>
<body>
<div id="AnkCoin">
<p>
Ankr:<?php echo $AnkrCoin[0]; ?>
</p>
</div>
<div>
<p>
Eos: <?php echo $EosCoin[0]; ?>
</p>
</div>
<div>
<p>
Cosmos Atom: <?php echo $CosmosAtom[0]; ?>
</p>
</div>
<div>
<p>
Mkr: <?php echo $Mkr[0]; ?>
</p>
</div>
</body>
</html>