elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Ruby] Funcion toma()
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Ruby] Funcion toma()  (Leído 1,394 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Ruby] Funcion toma()
« en: 10 Febrero 2012, 19:02 pm »

Una simple funcion para cargar una pagina web , la funcion retorna el codigo fuente de la pagina cargada.

Código
  1. #!usr/bin/ruby
  2. #Funcion toma()
  3. #Coded By Doddy H
  4.  
  5. require "net/http"
  6.  
  7. def toma(web)
  8.  return Net::HTTP.get_response(URI.parse(web)).body
  9. end
  10.  
  11. code = toma("http://127.0.0.1/post.php")
  12. print code
  13.  
  14. #The End ?
  15.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Ruby] Funcion tomar()
Scripting
BigBear 0 1,370 Último mensaje 10 Febrero 2012, 19:01 pm
por BigBear
[Ruby] Funcion speak()
Scripting
BigBear 0 1,379 Último mensaje 10 Febrero 2012, 19:02 pm
por BigBear
[Ruby] Funcion savefile()
Scripting
BigBear 0 1,355 Último mensaje 10 Febrero 2012, 21:02 pm
por BigBear
[Ruby] Funcion openwords()
Scripting
BigBear 0 1,356 Último mensaje 10 Febrero 2012, 21:03 pm
por BigBear
[RUBY] Proyecto sin finalizar Art ASCII Factory ¿Alguien me toma el relevo?
Scripting
Eleкtro 2 2,480 Último mensaje 24 Mayo 2012, 19:39 pm
por Eleкtro
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines