VoiceGuide IVR Software Main Page
Jump to content

Getting data from a PHP script

Recommended Posts

I have a script that needs to check some info from a web page.

I'd rather not shell IE like in the Yahoo stock example.

 

I have this vb script:

 

Function GetHTML(teamno)

Dim objXMLHTTP, strReturn

Dim lResolve, lConnect, lSend, lReceive, strUTL

Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")

lResolve = 5 * 1000 ' 5 seconds

lConnect = 5 * 1000 ' 5 seconds

lSend = 15 * 1000 ' 15 seconds

lReceive = 15 * 1000 ' 15 seconds

strURL = "http://www.austinmetrobaseball.com/teamdetails.php?team=" & teamno

objXMLHTTP.setTimeouts lResolve, lConnect, lSend, lReceive

objXMLHTTP.Open "GET", strURL, False

objXMLHTTP.Send

If objXMLHTTP.Status <> 200 Then

Exit Function

End If

strReturn = objXMLHTTP.responseText

Set objXMLHTTP = Nothing

GetHTML = strReturn

End Function

 

This particular script returns "Express" when teamno=42

Share this post


Link to post

If strReturn is holding the data you wish to save then this is how you would save the contents of strReturn as a Result Variable:

 

set vg = CreateObject("VoiceGuide.CommandLink")

vg.RvSet $RV_LINEID, "TeamName", strReturn

set vg = Nothing

 

and then you can use $RV[TeamName] in following modules/scripts.

 

see: http://www.voiceguide.com/vghelp/html/com_RvSet.htm

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×