Results 1 to 7 of 7

Threaded View

  1. #1

    Default ACP transfer via PHP

    I've attached a zip file that contains three files with PHP code. We use this to transfer control from our Linux scheduling system to the ACP scopes. I've simplified the code from what we use - fewer database calls, a single telescope, etc. - and I might have introduced some problems which I will fix if they exist. <g>

    Here's out this plays out:

    * The entry file can be anywhere (acp_transfer.php); the other two files have to be co-located (same subnet) as the ACP computer.
    * The users clicks on a link and goes to acp_transfer.php. This page evaluates the login request (are they scheduled?, for example) before proceeding.
    * acp_transfer.php get user details needed for ACP login from a database, then uses jQuery to POST those details to the ACP admin interface.
    * jQuery can't talk directly to an outside IP, so we use a proxy page to handle that. That file is proxy_acp.php. This is also a generally useful technique to be aware of, so I'm including it even though not every setup would require it (as when everything is local).
    * There are two jQuery AJAX POST calls: one to create the user, and one to enable the user with specific permissions (in case they already exist and the create fails).
    * Following the second POST, the user is transferred to the scope interface with their login data.
    * The third file is a simplification of something we set up as a cron job on the co-located server. It terminates a login at a scheduled time. The same principles apply - jQuery is used for POST, proxy is used for interface to ACP admin.

    This is somewhat bare bones, and the simplified code has not been tested (I'm on production deadline), but if anyone has to deal with this type of transfer from Linux or Mac to Windows for ACP, it will give you 90% of what you need in terms of technique to get the job done. When I get some time, I'll go over this and verify that it's a completely working sample (e.g., hard-coded variables instead of faux DB calls <g>).

    Hope folks find this helpful. It's a bit specialized, but may offer some useful ideas even to someone who is not in our type of situation (needing to integrate across operating systems).
    Attached Files Attached Files

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to transfer pinpoint astrometric engine and serial number to a new computer
    By David Moriarty in forum Customer and Pre-Sales Service (non-technical)
    Replies: 1
    Last Post: Oct 4, 2013, 18:15
  2. Cannot get objects to transfer from the Sky x to Planner
    By Michael Miller in forum ACP Planner
    Replies: 6
    Last Post: Aug 17, 2011, 22:00
  3. Transfer from Planner to Acp
    By John Leach in forum ACP Planner
    Replies: 6
    Last Post: Mar 30, 2011, 20:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •