Jump to content

Recommended Posts

Can't seem to get this to work, I've done something wrong with the html tags I think. Keep getting this:

 

Parse error: syntax error, unexpected '<' in blahblah.php on line 3

 

<?php
$url = $_GET['url'];
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="NaN" height="NaN" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
  <param name="src" value="$url" />
<embed type="video/divx" src="$url" width="730" height="420" pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>
?>

 

Can some kind soul help?

 

:)

Link to comment
https://forums.phpfreaks.com/topic/121941-help-with-really-simple-script/
Share on other sites

<?php

$url = $_GET['url'];

?>

<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="NaN" height="NaN" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">

  <param name="src" value="<?php echo $url;?>" />

<embed type="video/divx" src="<?php echo $url;?>" width="730" height="420" pluginspage="http://go.divx.com/plugin/download/">

</embed>

</object>

 

the above post is 100% correct. But i will fill in the lack of explanation  ;) (no hard feelings)

 

The scripts executes and reports the first and ONLY the first syntax error it finds. This is because it kills itself as soon as it finds an error and dumbs the log. You had to end the php with the "?>" tag BEFORE you started coding in HTML because the server is expecting everything between "<?php" and "?>" to be PHP, and any other languages have to be outside of these tags! Hope you understand!!

 

8)

You had to end the php with the "?>" tag BEFORE you started coding in HTML because the server is expecting everything between "<?php" and "?>" to be PHP, and any other languages have to be outside of these tags! Hope you understand!!

 

That is true obviously, but just to note that in a pure php script, a closing tag can be omitted as the interpreter knows when a script is finished even without it. That can be applied to included files for example. Even though, in a mix of php and html, closing tags are mandatory.

Another way to do it

<?php
$url = $_GET['url'];
echo '<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="NaN" height="NaN" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab">
  <param name="src" value="'.$url.'" />
<embed type="video/divx" src="'.$url.'" width="730" height="420" pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>';
?>

Ewwwww, cmd is Windows.  *Dies*

 

I remember you're totally anti-windows. So, you feel bad when you hear: program files, system32, autoexec.at. LOOL  :P

 

Ahhhh, autoexec. D:  Anyway, thread starter, is this problem all sorted out?  If it is, please click Solved on the bottom-left corner of the thread so it helps people find the answers in searches more easily.

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.