Jump to content

[SOLVED] links <a href="steam: and teamspeak:


Birdmansplace

Recommended Posts

<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.

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730738
Share on other sites

<?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 :D

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730741
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-730750
Share on other sites

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>

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731500
Share on other sites

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>

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731511
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731567
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/139511-solved-links/#findComment-731583
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.