Jump to content

Need Help: Launch embedded video via server side PHP script


Candy

Recommended Posts

I am attempting to launch my flash videos from variable URL (links) referenced on a server. Any help is greatly appreciated.

 

1) I am able to launch the video referenced directly...for example:

printf("Movie %s: <a href='http://.../embedded_flash_video.html'>%s</a>

 

and 2) I can print the URL as output from server via PHP script...for example:

printf("Movie %s: <a href='launch_movie.php?id=%s'>%s</a>

(where the 'link' database value is "http://.../embedded_flash_video.html")

 

 

launch_movie.php:

<?php

//.........connect....

  $id = mysql_real_escape_string($_GET['id']);

  $query = "SELECT id, movie, link FROM vid WHERE id='$id'";

  $result = mysql_query($query);

  // If results are found, output them
  if (mysql_num_rows($result) > 0) {

    $row = mysql_fetch_array($result);

    // Convert HTML entities prior to displaying
    printf("%s", (htmlentities($row['link'])));


  } else {
    printf("Failed");
  }

?>

 

But I do not know how to update the PHP script to simply launch the URL (link) for the selected id (with the result of launching the video as in #1 above) as opposed to printing the URL (link) when the href is clicked.

 

Thanks

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.