PDA

View Full Version : Posting data back and forth php files on different servers


m002.p
01-28-2009, 10:50 PM
Hello,

I have recently made a rather large script for gamers to manage banned players they come across etc for easier future reference.

Now due to the time and effort ive spent on this, I am asking those who want a copy for a small fee to help with my future support on the mod.

To stop copyright infringement and distributing to others without purchasing a serial, ive managed to code a way of posting data from the script to my main database on my server using the php $_POST variables.

However with that said, I can now check my database to ensure I keep track of those using my script.

Now to the point, I can post data to my server, but I am having trouble posting it back or working out how to. I want to post back update notifications to the script as well as a few things that will alert the user if they are not using a purchased script.

Any ideas what the best way is of posting data from my server to the script on the clients?

I have been told CURL can be used etc but POST only works one way as you then cant post data back again as it causes a massive loop of non stop transfers.

Any ideas would be appreciated.

Matt

Dismounted
01-29-2009, 05:27 AM
Basically, you can use cURL to access a certain PHP page on your server. This PHP file should output whatever you need. The script that requested this page will receive that output in return.

m002.p
01-29-2009, 06:25 AM
Hi Dismounted, have you any examples as ive searched google to no avail.

A tutorial you may know of would help instead if not.

Dismounted
01-30-2009, 03:49 AM
I just searched Google, and a relevant result came right up. Search "curl php" (without quotes).