Birdmansplace Posted January 5, 2009 Share Posted January 5, 2009 <a href="steam://connect/ip:port">steam</a> <a href="teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS">teamspeak</a> I am woundering if there is a way to have both these work at the sametime. Meaning one click on the link and both steam and teamspeak load. Any ideas or do i just have wish-full thinking. Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/ Share on other sites More sharing options...
dezkit Posted January 5, 2009 Share Posted January 5, 2009 <?php $load = $_POST["load"]; if(isset($load)){ fopen("steam://","r"); fopen("teamspeak://","r"); } ?> <a href="?load">Load steam and ventrilo servers</a> not tested Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-729817 Share on other sites More sharing options...
Birdmansplace Posted January 5, 2009 Author Share Posted January 5, 2009 <?php $load = $_POST["load"]; if(isset($load)){ fopen("steam://","r"); fopen("teamspeak://","r"); } ?> <a href="?load">Load steam and ventrilo servers</a> not tested page just reloads even with content in it given that it goes between // and " Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-729828 Share on other sites More sharing options...
Birdmansplace Posted January 6, 2009 Author Share Posted January 6, 2009 any ideas, anyone? Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730677 Share on other sites More sharing options...
redarrow Posted January 6, 2009 Share Posted January 6, 2009 try this way fingers crossed. <?php echo "<a href='".$_SERVER['PHP_SELF']."?cmd=1'>here</a>"; if($_GET['cmd']==1){ fopen("steam://","r"); header("location: ".$_SERVER['PHP_SELF']."?cmd=2"); } if($_GET['cmd']==2){ fopen("teamspeak://","r"); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730685 Share on other sites More sharing options...
Birdmansplace Posted January 6, 2009 Author Share Posted January 6, 2009 Warning: fopen(steam://) [function.fopen]: failed to open stream: Invalid argument in C:\xampp\htdocs\test\testlink.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\testlink.php:3) in C:\xampp\htdocs\test\testlink.php on line 12 Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730738 Share on other sites More sharing options...
dezkit Posted January 6, 2009 Share Posted January 6, 2009 <?php if($_GET['cmd']==1){ fopen("steam://","r"); header("location: ".$_SERVER['PHP_SELF']."?cmd=2"); } if($_GET['cmd']==2){ fopen("teamspeak://","r"); } echo "<a href='".$_SERVER['PHP_SELF']."?cmd=1'>here</a>"; ?> redarrow = good logic but forgot you can't echo anything before sending header information Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730741 Share on other sites More sharing options...
Birdmansplace Posted January 6, 2009 Author Share Posted January 6, 2009 Warning: fopen(steam://) [function.fopen]: failed to open stream: Invalid argument in C:\xampp\htdocs\test\testlink.php on line 3 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\test\testlink.php:3) in C:\xampp\htdocs\test\testlink.php on line 4 dam fopen Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730750 Share on other sites More sharing options...
Birdmansplace Posted January 7, 2009 Author Share Posted January 7, 2009 Well i guess i tryed. nothing i seem to do with all the above info doesn't work. Anyone else have any ideas or something. Other wise no big deal. Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731466 Share on other sites More sharing options...
RussellReal Posted January 7, 2009 Share Posted January 7, 2009 no.. this is also javascript try this.. <script type="text/javascript"> function startBoth() { d = document; links = ['teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS','steam://connect/ip:port']; for (i in links) { ifr = d.createElement("iframe"); ifr.src = links[i]; ifr.id = 'lolremoveme'; d.getElementsByTagName("body").appendChild(ifr); d.getElementsByTagName("body").removeChild(d.getElementById('lolremoveme')); } } </script> <a href="javascript:startBoth();">Start TeamSpeak + Steam</a> Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731500 Share on other sites More sharing options...
RussellReal Posted January 7, 2009 Share Posted January 7, 2009 o shoot sorry.. <script type="text/javascript"> function startBoth() { d = document; links = ['teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS','steam://connect/ip:port']; for (i in links) { ifr = d.createElement("iframe"); ifr.src = links[i]; ifr.id = 'lolremoveme'; d.getElementsByTagName("body")[0].appendChild(ifr); d.getElementsByTagName("body")[0].removeChild(d.getElementById('lolremoveme')); } } </script> <a href="javascript:startBoth();">Start TeamSpeak + Steam</a> Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731511 Share on other sites More sharing options...
Birdmansplace Posted January 7, 2009 Author Share Posted January 7, 2009 o shoot sorry.. <script type="text/javascript"> function startBoth() { d = document; links = ['teamspeak://ip:port?nickname=YOURNICK?loginname=YOURLOGIN?password=YOURPASS','steam://connect/ip:port']; for (i in links) { ifr = d.createElement("iframe"); ifr.src = links[i]; ifr.id = 'lolremoveme'; d.getElementsByTagName("body")[0].appendChild(ifr); d.getElementsByTagName("body")[0].removeChild(d.getElementById('lolremoveme')); } } </script> <a href="javascript:startBoth();">Start TeamSpeak + Steam</a> Thanks name. Works like a charm Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731567 Share on other sites More sharing options...
RussellReal Posted January 7, 2009 Share Posted January 7, 2009 Anytime, btw, the names Russell Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731571 Share on other sites More sharing options...
Birdmansplace Posted January 7, 2009 Author Share Posted January 7, 2009 Lol i think i need sleep. Hey russell is there anyway to add a close window command to the script. that way when i click on the link the programs load and do there thing and then the window closes? Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731578 Share on other sites More sharing options...
RussellReal Posted January 7, 2009 Share Posted January 7, 2009 I do not think javascript is allowed to close a user opened window.. however, if you have opened the window within javascript from another page, then the page is a "parent" to the "child" window than has the power to close it.. but as a security feature of javascript, you can't really do much to the original window. Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731583 Share on other sites More sharing options...
Birdmansplace Posted January 7, 2009 Author Share Posted January 7, 2009 O well. And thanks again Quote Link to comment https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731586 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.