Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/09/2008, 11:28
Ghosty
 
Fecha de Ingreso: junio-2008
Mensajes: 292
Antigüedad: 15 años, 11 meses
Puntos: 4
Call to undefined function curl_init() in

Hola tengo este codigo y me da el siguiente error
Fatal error: Call to undefined function curl_init() in C:\wamp\www\poker\api.php on line 8

Código PHP:
<?php

  
include "API.php";  // API $url and $pw values set here

  // Fetch the Site Name using the SystemGet API command.

  
$params "123456=" $pw "&Command=SystemGet&Property=SiteName";
  
$api Poker_API($url,$params);
  
$result $api["Result"];
  if (
$result == "Error") die("Error: " $api["Error"]);
  
$sitename $api["Value"];

  
// Fetch the list of players using the AccountsList API command.

  
$params "123456=" $pw "&Command=AccountsList&Fields=Player,Balance";
  
$api Poker_API($url,$params);
  
$result $api["Result"];
  if (
$result == "Error") die("Error: " $api["Error"]);

  
// Iterate through the players in the response and create a associative
  // chips array keyed on player name.

  
$accounts $api["Accounts"];
  
$chips = Array();
  for (
$i 1$i <= $accounts$i++)
  {
    
$player $api["Player" $i];
    
$chips[$player] = $api["Balance" $i];
  }

  
// Sort array in decending order.

  
arsort($chips);

  
// Display results in an html table.

  
echo "<table border='1' cellpadding='5'>\r\n";
  echo 
"<tr><th colspan='3'>$sitename - Chip Leaders</th></tr>\r\n";
  echo 
"<tr><th>Rank</th><th>Player</th><th>Balance</th></tr>\r\n";
  
$rank 0;
  
$total 0;
  foreach (
$chips as $p => $c)
  {
    
$rank++;
    
$total += $c;
    echo 
"<tr><td>$rank</td><td>$p</td><td>$c</td></tr>\r\n";
  }
  echo 
"<tr><td colspan='2'>Total chips</td><td>$total</td></tr>\r\n";
  echo 
"</table><br>\r\n";

?>
he estado mirando y es que me falta la libreria curl, pero he modificado el php.ini y copiado los archivos a system pero sigue dandome el error espero que alguien me pueda ayudar, un saludo y gracias.