DJ podał mi wszystko, u niego działa,a u mnie wyskakuje błąd podczas kompilacji... 
Jak mam temu zaradzić?
Fatal error: Call to undefined function curl_init() in /var/www/virtual/niemogepodacstrony.cba.pl/cache/tpl_BlackBlue.twoja_nazwa.php on line 27
A oto ten plik gdzie jest błąd:<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta name="Description" content="Kompilator plikow .sma" />
<meta name="Keywords" content="Kompilator plikow .sma, kompilator, sma, amxx, kompilator amxx" />
<title>Kompilator plikow .sma</title>
</head>
<body>
<center>
<?php
if ($_POST['go'])
{
function createPostString($aPostFields) {
foreach ($aPostFields as $key => $value) {
$aPostFields[$key] = urlencode($key) . '=' . urlencode($value);
}
return implode('&', $aPostFields);
}
$postFields['fname'] = $_POST['fname'];
$postFields['scode'] = $_POST['scode'];
$postFields['go'] = 'send';
$ch = curl_init('http://amxmodx.org/webcompiler.cgi');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3');
curl_setopt($ch, CURLOPT_POSTFIELDS, createPostString($postFields));
$tresc = curl_exec($ch);
if (curl_errno($ch))
echo 'Blad #' . curl_errno($ch) . ': ' . curl_error($ch);
curl_close($ch);
if (strpos($tresc, "Your plugin successfully compiled!"))
{
$tresc = substr($tresc, strpos($tresc, "http://www.amxmodx.org/webcompiler.cgi?"));
$ile = strpos($tresc, "</a>");
$link = substr($tresc, 0, $ile);
$tresc = substr($tresc, strpos($tresc, "Welcome to the AMX Mod X"));
$ile = strpos($tresc, "</pre>");
$inf = substr($tresc, 0, $ile);
$inf = str_replace("\r\n","<br/ >", $inf);
echo 'Kliknij w poniższy <b>adres</b>, aby pobrać plugin:<br />
<a href="'.$link.'"><b>Pobierz</b></a><br />
<pre>'.$inf.'</pre>';
} else
{
$ktory = strpos($tresc, "Your plugin failed to compile");
$tresc = substr($tresc, $ktory + 63);
$ile = strpos($tresc, "</pre>");
$tresc = substr($tresc, 0, $ile);
echo 'Nie udało się <b>skompilować</b> pluginu.<br /> Przeczytaj poniższy bład:<br />'.$tresc;
}
} else
{
echo '<ul>
<form action="kompilator.php" method="post" >
<br />
Nazwa pluginu : <input type="text" name="fname" size="15"><b>.amxx</b><br />
<br />
<br>Kod pluginu (Otwórz notatnikiem plik <b>*.sma</b> i wklej tutaj):
<br />
<textarea name="scode" rows="30" cols="100" TITLE="Tutaj wklej kod pluginu AMXX!"></textarea><br />
<br />
<input type="hidden" name="go" value="1">
<input type="submit" value="Kompiluj">
</form>
<ul>';
}
?>
</center>
</body>
</html>
Użytkownik Lukasz5 edytował ten post 21.05.2010 19:59