#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    29
    Rep Power
    0

    Having a C++ program talk to a php script on a remote server? Possible?


    Would it be possible for a C++ program to call for a variable from a remote php script on a server?

    I know PHP from when I was younger, but now in college im taking c++ and I already have a script which checks for a valid license on websites I have designed via php and I was wondering if I could use the same script to make sure c++ compiled programs are also licensed?

    Thanks!
  2. #2
  3. Wiser? Not exactly.
    Devshed God 2nd Plane (6000 - 6499 posts)

    Join Date
    May 2001
    Location
    Bonita Springs, FL
    Posts
    6,123
    Rep Power
    4103
    Sure, you could do it using some sort of socket interface. For example a standard HTTP request to a php script, or having a php script that runs it's own server socket and have the C++ program connect and talk to the PHP script that way.
    Recycle your old CD's



    If I helped you out, show some love with some reputation, or tip with Bitcoins to 1N645HfYf63UbcvxajLKiSKpYHAq2Zxud
  4. #3
  5. No Profile Picture
    I haz teh codez!
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Dec 2003
    Posts
    2,574
    Rep Power
    2341
    You can also use libcurl or WinHTTP (if you're on Windows).

IMN logo majestic logo threadwatch logo seochat tools logo