darkwolf Posted June 23, 2007 Share Posted June 23, 2007 If I sent 'www.darkwolf.ca/index.php?go=http://youtube.com/watch?v=MbILp2gRsEI&mode=related&search=' to my browser. How would we put the v=MbILp2gRsE into a vairable of $v; <? $go = $_REQUEST['go']; strstr ($go, $); //what the **** do I do?? ?> Quote Link to comment Share on other sites More sharing options...
darkwolf Posted June 23, 2007 Author Share Posted June 23, 2007 bump? Quote Link to comment Share on other sites More sharing options...
chocopi Posted June 23, 2007 Share Posted June 23, 2007 i think you could do $v = $_GET['v']; echo $v; ~ Chocopi Quote Link to comment Share on other sites More sharing options...
chigley Posted June 23, 2007 Share Posted June 23, 2007 <?php $go = $_GET["go"]; $query = parse_url($go, PHP_URL_QUERY); parse_str($query, $result); $v = $result["v"]; echo $v; ?> Quote Link to comment Share on other sites More sharing options...
darkwolf Posted June 24, 2007 Author Share Posted June 24, 2007 i think you could do $v = $_GET['v']; echo $v; ~ Chocopi Uhhh... thats just echo $_GET['v']..... there is none set? Thats not helpful...... .... <?php $go = $_GET["go"]; $query = parse_url($go, PHP_URL_QUERY); parse_str($query, $result); $v = $result["v"]; echo $v; ?> Sorry but that errors... I modified your method just a bit different and go it to work. Thanks very much. Heres the code if anyone needs <? $query=parse_url($go); parse_str($query[query], $result); echo $result['v']; ?> YAY! Quote Link to comment Share on other sites More sharing options...
chigley Posted June 24, 2007 Share Posted June 24, 2007 Never errored when I tested it Ah well, working now Quote Link to comment 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.