Solved

Capture Data From a PHP Script From Within MS Access VBA

Posted on 2014-01-28
5
1,165 Views
Last Modified: 2014-01-28
I would like to execute a PHP script from with Access VBA and capture the data that is generated into a variable.

Can someone help me with the code needed to accomplish this task.

Thanks
0
Comment
Question by:dwcummings
  • 2
5 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Where is the PHP script located?  Is it available at a URL so you can call it in the form of an API?
0
 
LVL 3

Author Comment

by:dwcummings
Comment Utility
It is located on a website. I cannot post the URL due to licensing restrictions from the vendor. But essentially, it is something like the following:

http://VendorSite.com/DataSource.php
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
Comment Utility
0
 
LVL 3

Author Closing Comment

by:dwcummings
Comment Utility
Thanks for the link and the help. Below is the code that I extrapolated from the site and used in my application:

Private Sub Test(strPage As String, strPost As String)

    Dim req As Object 'New MSXML2.XMLHTTP30
    Set req = CreateObject("MSXML2.ServerXMLHTTP")
   
    req.Open "POST", strPage, False
    req.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    req.send strPost
   
    MsgBox req.responseText

End Sub
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now