?
Solved

Capture Data From a PHP Script From Within MS Access VBA

Posted on 2014-01-28
5
Medium Priority
?
1,372 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 111

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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

762 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