Updated WD Vehicle
An update is available. Some corrections and improvements have been made.
You can download the update at the following address: # http://progwdm.free.fr/ sect1.8.
Thursday, April 26, 2007
Wednesday, April 25, 2007
How To Make Stiletto Heels
Retrieve an RSS feed in WebDev
To retrieve the contents of an XML file, you must use the HTTPRequest .
Here's the code:
is a string sURL = "http://nomDomaine.com/rep_du_Fichier_XML"
HTTPRequest (sURL , ProjetInfo ( piNomProjet )) / /
SRES is a string = HTTPDonneRésultat ( HTTPRésultat )
That SRES contains the XML feeds.
Then you must browse the file to extract items. The use of function "XML" makes it easy to get content.
There is a complete example in WinDev "RSS reader", procedures and classes are used in WebDev.
To retrieve the contents of an XML file, you must use the HTTPRequest .
Here's the code:
is a string sURL = "http://nomDomaine.com/rep_du_Fichier_XML"
HTTPRequest (sURL , ProjetInfo ( piNomProjet )) / /
SRES is a string = HTTPDonneRésultat ( HTTPRésultat )
That SRES contains the XML feeds.
Then you must browse the file to extract items. The use of function "XML" makes it easy to get content.
There is a complete example in WinDev "RSS reader", procedures and classes are used in WebDev.
25 Birthday Invitation
Find information from the IP address
It may be interesting from an IP address, for the country, city and geographical coordinates.
This is useful for displaying information related to the city, or position the user on a map.
is possible with the project hostip .
Here is a collection of procedures for retrieve these info:
Statements global procedures:
News is an associative array (*, *, *, 4) chains
RecupInfos PROCEDURE (SIP is a chain) s is a chain
/ / We asked hostip. IF NOT
HTTPRequest ("http://api.hostip.info/get_html.php?ip =" SIP + + "& position = true") THEN Error
() ELSE
SRES is a string = HTTPDonneRésultat (HTTPRésultat)
/ / SRES has the form
/ / Country: FRANCE (FR)
/ / City: (Unknown city)
/ / Latitude:
/ / Longitude:
FOR ANY CHAIN s SRES OF SEPARATED BY Attrib (10)
Info [SansEspace (ExtraitChaîne (s, 1 ,":", DepuisDébut))] = ExtraitChaîne (s, 2 ,":", DepuisDébut)
END END PROCEDURE
Country ( )
RETURN Info ["Country"]
PROCEDURE Town () SEND
info ["City"]
PROCEDURE Lattitude () RETURN
info ["Latitude"]
PROCEDURE Longitude () RETURN
Info ["Longitude"]
It may be interesting from an IP address, for the country, city and geographical coordinates.
This is useful for displaying information related to the city, or position the user on a map.
is possible with the project hostip .
Here is a collection of procedures for retrieve these info:
Statements global procedures:
News is an associative array (*, *, *, 4) chains
RecupInfos PROCEDURE (SIP is a chain) s is a chain
/ / We asked hostip. IF NOT
HTTPRequest ("http://api.hostip.info/get_html.php?ip =" SIP + + "& position = true") THEN Error
() ELSE
SRES is a string = HTTPDonneRésultat (HTTPRésultat)
/ / SRES has the form
/ / Country: FRANCE (FR)
/ / City: (Unknown city)
/ / Latitude:
/ / Longitude:
FOR ANY CHAIN s SRES OF SEPARATED BY Attrib (10)
Info [SansEspace (ExtraitChaîne (s, 1 ,":", DepuisDébut))] = ExtraitChaîne (s, 2 ,":", DepuisDébut)
END END PROCEDURE
Country ( )
RETURN Info ["Country"]
PROCEDURE Town () SEND
info ["City"]
PROCEDURE Lattitude () RETURN
info ["Latitude"]
PROCEDURE Longitude () RETURN
Info ["Longitude"]
Subscribe to:
Posts (Atom)