Solved

Capture Data From a PHP Script From Within MS Access VBA

Posted on 2014-01-28
5
1,226 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 109

Expert Comment

by:Ray Paseur
ID: 39815355
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
ID: 39815365
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
ID: 39815460
0
 
LVL 3

Author Closing Comment

by:dwcummings
ID: 39815746
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP AJAX JSON 2 57
Dlookup MSACCESS 5 24
vb.net 1 month apart 11 25
PHP Query return divisible by 3 3 15
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

786 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