Page 1 of 1

Central Code Location??

Posted: Mon Jun 30, 2003 11:58 am
by JPlush76
I'm noodling with the idea of creating a software package for multiple clients to use.. ideally for update purposes I would like to use a central code repository for non-custom functionality on my server.

basically

require_once('http://jimssite.com/code/here.php')

Does anyone see that as being a real performance problem? Pulling classes from a central server.

Posted: Mon Jun 30, 2003 12:01 pm
by nielsene
Well it will increase your server load, but not by a lot. However your server's availibility had better be pretty darn good or your clients will get upset when its down. They also may object to you "holding code hostage" depending on the nature of your contract with them.

And of course make sure you have both testing and production environments so when you change your common code you don't break all your clients at once :)

Posted: Mon Jun 30, 2003 12:42 pm
by JPlush76
well they would be issued a license for the software, data would be kept on their end but the software that powers it would be centralized. Of course all code would have to be tested in a test system before moving to the central location.

simillar thing

Posted: Mon Jun 30, 2003 3:32 pm
by phpScott
The company that I work with is just about to do a simillar thing with a bunch of javaScript code and the only problem we are having is how to protect that code and make sure that registered users of the code are the only ones accessing.

phpScott

Posted: Mon Jun 30, 2003 3:33 pm
by JPlush76
yea I can see javascript being a problem with that, being client side and all. when are you guys launching the code?

pretty soon

Posted: Mon Jun 30, 2003 3:47 pm
by phpScott
we will be launching the code pretty soon, well as soon as wee can get this issue sorted.

Because all the pages using the js are acutally php pages will be using an include statement to get the js code in, well just writing the javascripit src = lines. Were are just now playing with header info to see how we can get the url of the site requesting the script.
Im sure it won't be hard to do just need a few hours to play.

phpScott

Posted: Mon Jun 30, 2003 3:49 pm
by JPlush76
that should be easy if you use the HTTP_REFFER variable and just parse out everthing between http:// and .com and compare that against a list of allowable URLS

Posted: Mon Jun 30, 2003 6:25 pm
by Morbius
have you tried including it?

such as:

include("http://www.ur_<span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>_site_here.com/"."your_<span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>_code_location_here". ".php");

?

Thanks jplush76

Posted: Mon Jun 30, 2003 6:43 pm
by phpScott
That's exactly the little bit that I need jplush76.

as for Morbius' comment
nothing, no comment required. :?

phpScott

Posted: Mon Jun 30, 2003 6:46 pm
by JPlush76
score, glad we could help each other this fine fine afternoon ;)

Posted: Mon Jun 30, 2003 8:56 pm
by jason
Have you considered a SOAP solution? That would more likely be what you are looking for.

Posted: Mon Jun 30, 2003 8:59 pm
by llimllib
are you calling him dirty?

Posted: Mon Jun 30, 2003 11:01 pm
by JPlush76
lol llomlib!

Jason, I'm no to familiar with SOAP, how would that help?

Posted: Tue Jul 01, 2003 2:52 am
by []InTeR[]
Php complete has a tutorial about this.
Building a PHP Library