Community
Showing results for 
Search instead for 
Do you mean 
Reply

Connecting ACT! Premium v16 to remote PHP website

New Member
Posts: 6
Country: United_Kingdom

Connecting ACT! Premium v16 to remote PHP website

[ Edited ]

Hi all,

 

New here, so please bear with me.

 

My employer uses ACT! Premium v16 for storing customer info and I'm in the process of updating our company website. The website is coded in PHP and run on a Linux VPS. I had an idea, which from the looks of things seems possible, but I'm struggling to find code / info on how to do...

 

Our customers log into our website when requiring support, such as software or driver downloads for products they own of ours. In this area I thought it would be great to allow them to see their software license keys also (for when they need to reinstall our software). What I want to be able to do is connect from the PHP website to our ACT! database, search for the customers postcode / name in the database and retrieve their software license keys for presenting on the website.

 

Obviously for the above I only need read access, and from what I've read this is feasible somehow using ACT! Reader Utility. However, I haven't yet come across any further info on how this is actually done in PHP code.

 

The ACT! database is currently on a secondary server in our office (no external ip). I'm hoping to connect to our main server ip, then onto the secondary server which holds the ACT db somehow. The ACT Reader utility is already stored on the act server, but do I need the ACT Reader utility on the main server too? As this will be the one I'm connecting to as it has the only external IP address.

 

 

If someone could provide some example code or point me in the right direction it would be greatly appreciated.

New Member
Posts: 6
Country: United_Kingdom

Re: Connecting ACT! Premium v16 to remote PHP website

[ Edited ]

Looking into this a bit more:

 

I have installed the unixODBC and PDO_ODBC libraries/extensions on my CentOS Linux & PHP 5.6 server, so I should be able to use a standard PDO_ODBC connection. I'm just struggling on what to put in the connection query. I was hoping it would be fairly simple Smiley Sad

 

I found the following examples on the php.net site for connecting using an ODBC connection.

 

Example 1:

<?php
$cnx = new PDO("odbc: Driver={SQL Native Client};Server=250.156.0.1;Database=myDataBase; Uid=userName;Pwd=thePassword;");
?>

 

Example 2: 

odbc: DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME=localhost;PORT=50000;DATABASE=SAMPLE;PROTOCOL=TCPIP;UID=db2inst1;PWD=ibmdb2;

 

Example 3:

odbc: Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\\db.mdb;Uid=Admin

 

 

* What SQL Driver should I state? The ODBC connection setup on the ACT! server states: Microsoft SQL Server Native Client Version 10.50.2500 / Native Client Version 10.0 (depending on which screen you look at). Do I put either of these under the DRIVER={} section above? Can I leave it as per example 1: SQL Native Client?

* Do I need to connect specifically to a .pad file? Or can I use the DATABASE= option above to connect to the database?

* As the ACT database is currently on an internal server (Windows 7) and I want to connect through our main server (Microsoft server 2012) with an external IP, what would I put under each of the following sections above: server= / hostname= / port=? Do I need all three? The ACT server is currently set as NEWACTPC\ACT7 

 

I can install any drivers I need on the linux VPS or on the act / main windows servers, so I have no limitations there if I need something else.

 

I'm now stuck until I can answer all of the above. I've not ever connected to ACT! before, so I'm shooting in the dark. Any help is greatly appreciated.

Bronze Elite Contributor
Posts: 1,409
Country: United_Kingdom

Re: Connecting ACT! Premium v16 to remote PHP website

Have copied this in to the Developers forum, will copy back any replies.

Administrator
Posts: 4,024
Country: United_Kingdom

Re: Connecting ACT! Premium v16 to remote PHP website

It's worth noting the Act premium v18 web API would make this much easier to achieve.
More info here and here.

New Member
Posts: 6
Country: United_Kingdom

Re: Connecting ACT! Premium v16 to remote PHP website

Hi Gary,

Thanks for your input. Is there no way of doing this with the v16 ACT then? As I've almost given up due to the lack of information available. I'm assuming as no one has replied here it is a very difficult solution that is required (if at all).
Administrator
Posts: 4,024
Country: United_Kingdom

Re: Connecting ACT! Premium v16 to remote PHP website

Hi BottyZ,

The Web API is only available in v18 and above. I'm not personally familiar enough with other methods of external SQL data access to say if it would be possible or not in v16. ch1p is correct, the Developers forum would be the best place to find this info.

Bronze Elite Contributor
Posts: 2,545
Country: New_Zealand

Re: Connecting ACT! Premium v16 to remote PHP website

[ Edited ]

BottyZ,

We developed the original Web API for Act back in 2010, XData, which will work with v 16 Pro or Premium. Refer  http://xdata.xactsoftware.co.nz

 

Graeme Leo
Xact Software - consultants and developers
Follow us on Twitter and check out our Blog


New Member
Posts: 6
Country: United_Kingdom

Re: Connecting ACT! Premium v16 to remote PHP website

Hi Gleo, 

 

Thanks for your reply. How would I use xdata to read data to our PHP website from the ACT server, through our main server? Do you have some working examples I could see? If you could offer a trial of xdata also, that would be great.

 

Additionally, what sort of cost is involved in purchasing the Xdata API?

 

Thanks again and apologies for the questions, I need to be sure it would work before I would commit to purchase.

New Member
Posts: 6
Country: United_Kingdom

Re: Connecting ACT! Premium v16 to remote PHP website

Hi Ch1p,

 

We already have the act reader utility installed on the act server, however what I was looking for was an example of the php needed to connect to it? All I can seem to find is guides to connect to the ACT db from a LAN or closed network. I'm trying to access it from the internet through our main server which has an external IP address.

From the sounds of it, there is no option to do so unless we upgrade. We've been in touch with our ACT provider for costings, but it seems quite expensive since we have so many licenses to upgrade.

 

Thanks for your input.