Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-14-2006, 06:46 PM
spiderbait's Avatar
WebProWorld Pro
 

Join Date: Oct 2003
Location: Gibsons, BC, Canada
Posts: 298
spiderbait RepRank 2
Default Need php/mySQL solution for multiple domains

Hi everyone,

Hopefully someone here knows of an existing script or program that will do this (or easily modified to do this). Or perhaps the requirements are not so great that it would be impossible for me to do myself.

Background:

I'm working on a project for many affiliate sites but they've got unique domain names (identical except for their IDs and domain names). It's a new project, and expected to grow, so I want to change how things are set up to make it easier to maintain.

Currently I'm giving them unique accounts in cPanel (through a hosting reseller account) and having to replicate the accounts manually and modify the affiliate ID on a case-by-case basis.

I've already tried to simplify this process, so I'm making the pages in php and inserting a few includes to small text files for their affiliate IDs and domain names. This way I only need to modify those little text files on a case by case basis.

Desired Solution:

But ideally, I'd like to see about developing a php program that will use a database, so that I can insert their ID and domain name into a database and have the pages retrieve that info from the database (probably developing a cookie system would also be useful too).

Since they're different domains, I've thought that I might put them all in one hosting account, but treat them as either addon or parked domains.

If they're parked, then the program would need to detect the domain the person arrived on and search the database for a match to retrieve the ID, include the domain name in some URLs and set the cookie.

If they're addons (or separate accounts), I'll still need the same functionality, but am not sure how it would work having to retrieve info from a database on a different domain. Although if they're addons they'll technically be subdomains of a parent account, so the database can probably belong to the parent and be easily accessed.

Some of them will need to be separate accounts no matter what, since some of the sites have upgraded to SSL certificates in order to transact on their own domain while the rest will be redirecting to a central shared processing page. So, that shared processing page will need to be able to receive input from the affiliate pages so it can credit the ID, provide a link back to the affiliate, et cetera.

Bonus Function:

If this system could track hits per domain or affiliate ID that would be great too!

Conclusion:

Hopefully I've explained what I'm looking for well enough. Does such a beast exist? If not, how difficult would it be to create? I've modified a lot of PHP scripts in the past, but have never created one. I've also worked with mySQL only in the context of pre-existing scripts, so I've never created one from scratch.

If I need to hire someone to create this, any thoughts about how much it might cost? Anyone out there interested in the job?

Thanks in advance,
Jade
__________________
Jade Burnside, Ahead of the Web
What good is your web site if no one can find it?
SEO & Optimized Web Site Design
Reply With Quote
  #2 (permalink)  
Old 01-17-2006, 01:05 AM
WebProWorld Pro
 

Join Date: May 2004
Location: Austin, TX
Posts: 199
steve0 RepRank 0
Default

There are a bunch of easy ways to manage this..

Domain aliasing via the Control panel,
then use the hostname in an SQL query..

even the SSL stuff.. whatever is coming in on 443, can still read from the same includes..

It should be a fairly straightforward..
and not a lot of work..

PM or email me if you need help
__________________
Hardcore Programming Solutions and Coffee Drinker
Reply With Quote
  #3 (permalink)  
Old 01-17-2006, 11:05 PM
spiderbait's Avatar
WebProWorld Pro
 

Join Date: Oct 2003
Location: Gibsons, BC, Canada
Posts: 298
spiderbait RepRank 2
Default

Hi Steve,

Thanks for your response and for your offer to help. I'm looking forward to figuring this all out. Unfortunately, as web-saavy as I am about some things, your response leaves me a little blank about most of this.

So, here's where I stand. I've never created an SQL database or written my own queries. I've only ever tinkered with other people's through trial and error.

I was hoping there would be an out-of-the-box solution that I could 'tinker' with to make it fit. But I'm happy to create something from scratch if need be. At least then I can make sure to get the features I want.

So, I probably need a little bit of help in getting my head wrapped around this problem first. So, I'm contacting you by email, but I'm also posting this so that you and anyone else who wants to can contribute thoughts or ideas.

Project Scope

We have sites A, B and C (and so on). We want them all to:
  1. Use the same content from a central source with only minor details being drawn from a database. This is goal #1.
  2. Have tracking to record visits to pages in sites A, B and C. This is goal #2 (optional wishlist - not required).
  3. Have a cookie function (as a failsafe) to capture affiliate ID so that it can be read if the person came back to the purchase site later without following the same path. This is goal #3.
For Goal #1:
You're saying that this can work for aliased (parked) domains as well as add-ons (subdomains) and the pages can contain queries that dynamically contain the domain name the visitor arrived on and retrieve the appropriate data.
So we need to:
  1. create the database
  2. develop the queries to retrieve data from the db
We'll also need to
  • create a single source for the bulk of the page content that's not dynamically generated.
To work with SSL, I'm assuming we would need to:
  • enable SSL on the host account for the db (on which all the other sites are also parked or added) and have the queries directed through port 443.
For Goal #2: (optional wishlist - not required)
The database will need to be writable so that:
  1. the pages visited can cause an entry in the db
  2. the administrator can expand the database as new sites are added to the network.
For Goal #3:
  1. The payment processing page will need to have cookie reading ability to detect the original source of the visitor.
  2. The other pages will need to have cookie placing ability in order to set the cookies in the first place.
Other Notes & Questions:

We'll be using what I assume is a typical cPanel configuration as a hosting reseller. Will things such as the 443 query possibly be restricted or require greater permissions in this configuration?

I've been assuming that parking or adding-on domains was necessary in order to access the database, but if SQL queries can be made across different domain names and IP addresses, is there an advantage to going one way or the other?

The bulk of the page content for the sites may be updated once a month. Is there a dis/advantage to having this content in the database too vs. in separate include files?
__________________
Jade Burnside, Ahead of the Web
What good is your web site if no one can find it?
SEO & Optimized Web Site Design
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0