Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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