Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

GetURL – PB Docs 150 – PowerBuilder Library

GetURL – PB Docs 150

GetURL PowerScript function

Description

Returns HTML for the specified URL.

Controls

Inet objects

Syntax

Argument

Description

servicereference

Reference to the Internet service instance

urlname

String specifying the URL whose source
data is returned in data

data

InternetResult descendant containing
an overridden InternetData function that handles
the HTML source for urlname

Return Values

Integer. Returns values as follows:

  •  1 Success

  • -1 General error

  • -2 Invalid URL

  • -4 Cannot connect to the Internet

Usage

Call this function to access HTML source for a URL.

Data references a standard class user
object that descends from InternetResult and that has an overridden InternetData function.
This overridden function then performs the processing you want with
the returned HTML. Because the Internet returns data asynchronously, data must
reference a variable that remains in scope after the function executes
(such as a window-level instance variable).

For more information on the InternetResult
standard class user object and the InternetData function,
use the PowerBuilder Browser.

note.png Timeout value for retrieving HTML source

The GetURL function relies on wininet.dll to
obtain the HTML source and returns -1 when the retrieval time exceeds
the DLL timeout value. When you install Internet Explorer 7 or later,
the default timeout value for this DLL is 30 seconds. Although it
is possible to change the timeout value by configuring a DWORD ReceiveTimeOut
registry key under HKEY_CURRENT_USER SOFTWAREMicrosoftWindowsCurrentVersionInternet
Settings, this is not recommended, since it can also affect the
behavior of the Internet Explorer browser.

Examples

This example calls the GetURL function. Iinet_base is
an instance variable of type inet:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x