PHP - Diferencia entre file_get_contents y curl

 
Vista:

Diferencia entre file_get_contents y curl

Publicado por Gonzalo (8 intervenciones) el 01/07/2011 04:36:49
Hola quisiera saber cuál es la diferencia entre usar:

1
2
3
curl_setopt($ch, CURLOPT_URL,$url);
  curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
  curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);


y

1
$ch = file_get_contents ($url);


Por lo que entiendo las 2 bajan el contenido y lo guardan en $ch verdad?.

Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder