View Full Version : Need a php code that will launch a .xpi file if user has firefox installed
Craigslist.org
04-07-2009, 02:31 AM
Does anyone know how I could do this? Im upping popular php scripts but I want users to install my toolbar when they use the script on their site.:cool:
It should only try to install once so the end user doesnt end up getting pissed off.
Clover
04-07-2009, 04:50 AM
Could be a better way, but right off the top of my head what about uploading the XPI file to your server, and linking to the XPI file, even if through header('location: http://yourserver.com/toolbar/toolbar.xpi');. Since you can't make it install without the users consent, I see no point in going any further around it than that.
Craigslist.org
04-08-2009, 03:58 PM
Could be a better way, but right off the top of my head what about uploading the XPI file to your server, and linking to the XPI file, even if through header('location: http://yourserver.com/toolbar/toolbar.xpi');. Since you can't make it install without the users consent, I see no point in going any further around it than that.
Well I kind of want to force it on them. :D
Axiom
04-13-2009, 12:20 AM
you could make em try to watch a video, which is just an animated gif of a video player that when clicked launches the XPI file???
Clover
04-13-2009, 01:11 AM
you could make em try to watch a video, which is just an animated gif of a video player that when clicked launches the XPI file???
It would still prompt them to install or not.
Axiom
04-13-2009, 02:43 PM
It would still prompt them to install or not.
yeah, but I think it might get a better percentage of conversion...
dioxide
04-13-2009, 04:03 PM
hm. this is untested, but you should be able to work with it. use some javascript to call the php so it doesnt interfere with the script theyre trying to use.
<?php
if (stristr($_SERVER['HTTP_USER_AGENT'], 'mozilla')) {
header('location: http://location.of/xpi');
}
?>
Clover
04-13-2009, 06:28 PM
hm. this is untested, but you should be able to work with it. use some javascript to call the php so it doesnt interfere with the script theyre trying to use.
<?php
if (stristr($_SERVER['HTTP_USER_AGENT'], 'mozilla')) {
header('location: http://location.of/xpi');
}
?>
Exactly. It will still auto prompt every time the page is loaded though, despite the toolbar being installed. It'd need to be optimized to check if it's already installed, but this is a start here. :thumbsup:
Craigslist.org
04-13-2009, 07:39 PM
hm. this is untested, but you should be able to work with it. use some javascript to call the php so it doesnt interfere with the script theyre trying to use.
<?php
if (stristr($_SERVER['HTTP_USER_AGENT'], 'mozilla')) {
header('location: http://location.of/xpi');
}
?>
It'll still prompt them but it will be handy as a download link to put on my main page withought needing to send them to conduits site. Cheers! :D
vBulletin® v3.8.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.