Forum Moderators: coopster
I'm running a community site, with chats, user profiles etc..
I'd like to give other webmasters ability to use my app on their sites. I'd like to do that as SIMPLE as possible - prefferably by pasting a single url:
[partner.mydomain.com...]
the problem is I don't want to rewrite exiting code: I want to call the code Ive written so far, and runs on my site.
also, I found auto_prepend and auto_append directives which in conjuction with the global vars such as $SERVER_NAME and $SERVER_ADDR, could make this work even better.
anyone has any experience with it? I just made some quick research and that's all I got at the moment. Any input appreciated.
thanks.
Your PHP installation needs to have allow-url-fopen [us2.php.net] enabled, which it is by default. Some tinfoil-enabled admins may turn it off.
You should check your PHP version (<? php_info();?>). I think that it wasn't well supported before 4.3.
as I said, I have a website already running, that consists of whole bunch of script:
chat.php, register.php, profile.php, etc, etc..
and I access it by typing www.mydomain.com/chat.php
but I'd liek to create a service for other gigs so that they take advantage of my app, by pasting a simple URL, like:
include("http://partner.mydomain.com/index.php?s=SESSIONID&p=PARTNERID....etc..");
ok, so whats the big deal? they have already included my app, right?
the problem is, the chat has embedded links (ie people's nickname are linked to their profiles). so when someone clicks on the link, it would actually lead to my site.
But I don't want that. I'd like people to think they are still on the same site. I need just to retrieve content from my site.
as I said before, I don't wanna rewrite my existing code, instead I want to prepare environment before any code is executed. that's where auto_prepend and auto_append come into play. and that's where I got stuck;) I mean I tried with fopen, but that's not the way to go (broken links etc..)
I think I would have to get affiliate's URL from query,
go get content (ie chat), and redirect it back at the affiliate address with the content embedded to it. Is this possible to do that?
That client-side stuff is important, though. If the client doesn't do that, good luck. We tried a bunch of scenarios before settling on that.
You could wrap the client side stuff in an SDK, and send that to people who want to embed your service.