Jump to content

Installing scripts on one domain, but controlling it from another domain


chiefrokka

Recommended Posts

Newbie to php, but I've programmed some football scripts to teach myself PHP each year... it's starting to get more popular each year so I need to change the way I handle it.  www.phpPicks.com

 

I need help taking control of all my scripts so their all run off my server, and I'm not giving out my scripts.  The problem is people love to install the scripts on their OWN domain so they can integrate it into their sites.  I'm afraid I'll lose sales by just having it so people HAVE to access their league via my site like Yahoo does.

 

Ultimately, I'd like to still sell the scripts and allow people to install it on their domain so users go to their actual domain... But I'd like to change the code so enough of it runs off my domain and keeps me still in control and people can't just rip off my scripts.  This also allows me to provide updates very easily by just updating files on MY domain. 

 

Each page is built dynamically based on NFL matchups, users in your league and their picks they've made... so each page has to load tons of variables from the database first. 

 

 

Can someone help me do this please? 

 

I've never connected to another domain before, and I think I need to keep all the functions on MY domain so other domains just call them to get all the variables and calculations they need.  If it's installed on someone's domain, they need to be able to have users make their picks and update values on MY database.

Link to comment
Share on other sites

This can be done. Look into cURL with PHP.

 

If you're looking to hire,  there's a freelance section.  :P

  not looking to hire, haha... I will have to do some more research on cURL.  I've heard of it but haven't really experienced much of it.  Are there any other functions that I'll need to know?  Do I have to do anything with my GoDaddy account to allow other domains to login to databases? 

 

I remember last year I attempted to organized my scripts into functions and call those function files, but I was having trouble with global variables as they weren't staying throughout every page.  I'll play with it more this year to figure out what I was doing wrong

Link to comment
Share on other sites

Basically, set up a set of reciving files on your server somewhere. Then set your user's scripts (or whatever you are doing) to send data to your receving files via cURL.

 

curl_set_opt() in particular is a function you should look into.

 

basically send post data with it, which when sent to your scripts, will access your db, etc, and then send data back. :D

 

it can be used in a bunch of different ways, and is great for server-to-server (http) data transmission.

 

hope that helps. :D

Link to comment
Share on other sites

thank you, i'll look into that function.  one question I've read from google searches is having to do something with your domain to allow outside access.  I'm on GoDaddy so do I have to go into some cPanel and change some settings?  By opening it up to allow other sites to access your db (or even basic files like header/footer, are you opening up a can of worms for malicious attacks?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.