gnope php gtk gui gnope.org  

Launch default browser?

 
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
beidlerj



Joined: 10 Feb 2006
Posts: 55
Location: Oregon, USA

PostPosted: Thu Mar 02, 2006 2:20 am    Post subject: Launch default browser? Reply with quote

I don't think such a function exists, but just in case...

Is it possible to make your app launch the user's default web browser and point it at a certain URL?
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Thu Mar 02, 2006 8:17 am    Post subject: Reply with quote

I wrote a PEAR-compatible package: File_Launcher
http://www.cweiske.de/download/pear/File_Launcher-0.1.0.tgz
that does exactly this, in an operating system independent way.
Back to top
beidlerj



Joined: 10 Feb 2006
Posts: 55
Location: Oregon, USA

PostPosted: Thu Mar 02, 2006 7:19 pm    Post subject: Reply with quote

Thanks, Christian!

I always forget to check PEAR, since it's new to me. I just looked, though, and didn't find the package, so I guess you haven't uploaded it yet and it only lives on your own server. Smile

I had to change one thing to get the class to work... it was trying to launch "kfmclient" on my WinXP box. I just changed the
Code:
function FileLauncher()
to
Code:
function __construct()
and everything worked after that. Took me a minute to figure out that I had to add "http://" to the beginning of my string parameter to get it to launch the default browser instead of my code editor for .php files. Duh... guess I need more coffee. Hehe. Cool
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Thu Mar 02, 2006 10:39 pm    Post subject: Reply with quote

I didn't apply in PEAR with that package yet, that's why I gave the URL to my page :)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.