Hi,
I have content to my site that my provider has instructed I display on my site using the following code:
<!--#include virtual="fbn3.cgi?mode=mklnk&movie=/path/video_1.wmv" -->
I believe the above is CGI code although I am not 100% certain.
Is it possible to write this into a PHP variabel, soething like:
$content=<!--#include virtual="fbn3.cgi?mode=mklnk&movie=/path/video_1.wmv" -->;
Thanks in advance,
Rob.
CGI and PHP?
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: CGI and PHP?
I'm not clear on what your question is exactly though if you're trying to do an include in PHP like you are in Perl then...
You can also do it without the parenthesis I think?
Is this what you mean?
Code: Select all
include("fbn3.cgi?mode=mklnk&movie=/path/video_1.wmv");Code: Select all
include"fbn3.cgi?mode=mklnk&movie=/path/video_1.wmv";-
spacebiscuit
- Forum Contributor
- Posts: 390
- Joined: Mon Mar 07, 2005 3:20 pm
Re: CGI and PHP?
I think that may work, I basically need to assign whatever is returned by the cgi to a php variable.
Is that possible?
Thanks,
Rob.
Is that possible?
Thanks,
Rob.
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Re: CGI and PHP?
Well you could pass an HTTP query!
In PHP you can read a query like this...
my_file.php?want=candy
Does this help?
In PHP you can read a query like this...
my_file.php?want=candy
Code: Select all
<?php
if ($_GET['want'] == "candy") {$my_var = 'chocolate';
else if ($_GET['want'] == "fruit") {$my_var = 'apple';
// Ok so have PHP spit out some HTML to show what we have!
echo '<h3>'.$my_var.'</h3>';
?>