Internet plug-in: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Reverted edits by 94.23.238.222 to last version by 89.160.21.47)
 
(7 intermediate revisions by 4 users not shown)
Line 2: Line 2:


== Links ==
== Links ==
 
[http://nsis.sourceforge.net/Joel_plugin_src Main]
[[Image:Zip.gif]] [http://plugins.joelito.com.mx/descargas.php?file=Internet.zip Internet.zip] (11KB)<br>
<br>
<attach>Internet.zip</attach>
<attach>Internet.zip</attach>
[http://plugins.joelito.com.mx/ Joel's plugins site]


== Description ==
== Description ==
Line 15: Line 13:
# Get the status code of urls. For example 404 code is for urls that don't exist.
# Get the status code of urls. For example 404 code is for urls that don't exist.


== Functions ==
=== GetLocalHostName ===
Internet::GetLocalHostName return_var
: Returns the name of your local host.
=== GetLocalHostIP ===
Internet::GetLocalHostIP return_var
: Returns the IP of the machine were is running the plugin.
=== GetUrlCode ===
Internet::GetUrlCode "site" "file" return_var
: Returns the status code of a input url to see if a file exists in the server. See the status code page.
: Note: remove the "http" or "ftp" in your links. For example: if you url is "http://www.loco.com/file.zip" then you should input "www.loco.com" as the site and "file.zip" as file.
[[Category:Plugins]]
[[Category:Plugins]]

Latest revision as of 20:25, 15 May 2013

Author: Joel (talk, contrib)


Links

Main
Internet.zip (11 KB)

Description

Handy functions related to the internet:

  1. Get the host name of the local machine.
  2. Get the IP of the local machine.
  3. Get the status code of urls. For example 404 code is for urls that don't exist.

Functions

GetLocalHostName

Internet::GetLocalHostName return_var
Returns the name of your local host.

GetLocalHostIP

Internet::GetLocalHostIP return_var 
Returns the IP of the machine were is running the plugin.

GetUrlCode

Internet::GetUrlCode "site" "file" return_var
Returns the status code of a input url to see if a file exists in the server. See the status code page.
Note: remove the "http" or "ftp" in your links. For example: if you url is "http://www.loco.com/file.zip" then you should input "www.loco.com" as the site and "file.zip" as file.