Imprimer RebZone
Win32 Linux Mac
Rebol
(c) 2025 RebolZone - http://rebolzone.free.fr
[ Général ]
Accueil
FTP
[ Rebol ]
Présentation
Installation
Rebol/View
Rebsites
[ Coding ]
Coding Tutorial Start
Outils MySql VID FAQ
Syntaxe Download
[ Divers ]
Documentation
Liens Recherche
Ecrivez-nous
Visiteurs
Visteurs
Samedi 31 mai 2025

Coding - Infos d'une page Web (Rebol/View)

Valid XHTML 1.0!
REBOL 
 [ 
  Sujet: "Récupération des infos d'une page Web"
  Auteur: "RebolZone"
  Version: 1.0.0
  Commentaires: "Nécessite Rebol/View"
  ]

recupInfoPage: does [
; Procédure de récupération

	scanUrl: make url! txturl/text

	;Test si URL existe
	either exists? scanUrl [
		;Si oui, on récupè re les infos
		pageInfo: info? scanUrl
		pageTaille: pageinfo/size 
		pageDate: pageinfo/date

		;Affichage des résultats
		txt1/text: pageDate
 		show txt1

		txt2/text: pageTaille 
		show txt2
	]
	[
		;Url Non trouvée
		txt2/text: " "
		txt1/text: " "
		show txt1
		show txt2
 
		alert "Url Non Valide ou Indisponible !"
	]
]

;Création de la fenêtre
wFen1: layout [
		
		;Affichage du fond
		backdrop effect[color gradient 38.102.130 177.223.247]

		;Affichage logo
		image http://rebolzone.free.fr/reb/rbzonelogomin.jpg

		;Saisie de l'URL
		text 255.255.255 "Entrez l'URL d'une page WEB : "
		txturl: field 300x20
		
		text 255.255.255 "Date : "
		txt1: text 255.255.255 "................................................................."

		text 255.255.255 "Taille en octet : "
		txt2: text 255.255.255 ".............."

		button "Fermer" [ 
					quit
				    ]
		button "Infos" [
					;Appel de la procédure
				 	recupInfoPage
				    ]
	] 
;Affichage de la fenêtre
view/title wFen1 "RebolZone" 

Commentaires : Cet exemple utilise une procédure, la fonction info?. La fenêtre Webpageinfos