i wanna make my own site like that it's rapid youtube code to my site example http://rapidrelease.info/youtube.php?id=7KCUpeh7DKk http://rapidrelease.info/youtube.php?id=URFW9EDeeCw http://rapidrelease.info/youtube.php?id=3CBeIc2sqHQ http://www.youtube.com/watch?v=7KCUpeh7DKk http://www.youtube.com/watch?v=URFW9EDeeCw http://www.youtube.com/watch?v=3CBeIc2sqHQ just change eny code from youtube like this 3CBeIc2sqHQ and but at http://rapidrelease.info/youtube.php?id=XXXXXXX it's work eny vedio i wanna make the same on my site
Just generate a random string <?php function generateRandStr($length){ $randstr = ""; for($i=0; $i<$length; $i++){ $randnum = mt_rand(0,9); $randstr .= $randnum; } $query = "SELECT COUNT(*) FROM CodeContent WHERE StringID = '{$randstr}'"; $result = mysql_query($query); $row = mysql_fetch_assoc($result); if ($row['COUNT(*)'] > 0) { // if it already exists, do it again $randstr = generateRandStr($length); } return $randstr; } $string = generateRandStr(11); ?> PHP: and then on your youtube.php page you simply get the id with $_GET and then match the string in a database and find the information you want to display or the link you want to redirect to
http://rapidrelease.info/youtube.php?id=URFW9EDeeCw u see this link its open youtube vedio just i change this code URFW9EDeeCw from URL and write eny video code the vedio open i need to make page like this youtube.php?id=xxxx automaticly redirect from youtube to my site my domain www.xxx.com/youtube.php?id=[write here eny vedio code from youtube] and open like this site http://rapidrelease.info/youtube.php?id=URFW9EDeeCw
Its look like you want to display the youtube videos on the website on the basis of the “id†from the query string. But I m not sure from where you get the “id†values i.e. from DB or from third party API? But all you need to get the “id†value and passed into the URL with $_REQUEST. Ex. http://rapidrelease.info/youtube.php?id=<?php echo $_REQUEST[‘id’];?>