3
Contributors
25
Replies
28
Views
6 Years
Discussion Span
Last Post by arjani10
0

Well in future could you please post the error. But assuming that it's the error I think it is then you will need to do the following. First of all make sure the page starts with <?php instead of <? for compatibility reasons. Also make sure the header() function has a lower 'h'. Then most importantley of all make sure there is no html or browser output before the header function. The header function is one of the few special functions that can not be used after an echo or print statement due to the way php is designed. Hope that solves it.

0

Really genius like your ocupation (lol).thank you very mutch was that <?php string do it all error.

0

The code you have submitted contains the base64_encode() function which turns the string into an encrypted result. Then you have encoded it for url variable/$_GET[] input. So as that code stands it is very unreadable without the help of php to decode it. And that would be why a number 7 may occur on the displayed string. Also if it is after it is decoded you see the number 7 than that is what $id contains at time of encode.

0

Thanks cwarn23 ,what i have to put for that?have a solution for me please?.

0

Thanks this is working nice.This link for me is important, can i hide or encrypt it ?Best regard .

0

Thank you for your time ,i mean to encrypt that link like before

urlencode(base64_encode

is impossible?

0

Thank you for your time ,i mean to encrypt that link like before

urlencode(base64_encode

is impossible?

Well that turns the link into a way that it cannot be clicked or read. I think what you are after is the apache mod rewrite. This will allow you to have all sorts of crazy url's using a .htaccess file. But it all depends how do you want the link to be displayed as?

Edited by cwarn23: spelling

0

i use that link into embed code i only want no body see the real link directly,all modes bu not direkt link see.Thanks again.

0

Is this code a javascript redirect or something because I need to see what context the link is used in for relevant encoding.

0

Well you could encode it with base64_encode then in your java or flash applet, edit the java/flash source so that it decodes the string upon receiving. So below is the php code but I'm not sure what the java or flash code would be.

echo '<param name="MRL" value="'
echo base64_encode('http://mysite.com/header.php?id='.$id);
echo '">';

Edited by cwarn23: n/a

0

This is my copmlet code that i use

<object id="vlc" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" width="500" height="400" events="True">
        <param name="AutoLoop" value="-1">
        <param name="AutoPlay" value="-1">
        <param name="ExtentWidth" value="11641">
        <param name="ExtentHeight" value="10371">
        <param name="MRL" value="<?php echo 'http://mysite.com/abc.php?id='.$id; ?>">
        <param name="Visible" value="0">
        <param name="Volume" value="90">
        <param name="StartTime" value="0">

		<param name="vlc2.jpg"> 
        <param name="BaseURL" value="http://www.mysite.com">
        <embed pluginspage="#" type="application/x-vlc-plugin" progid="VideoLAN.VLCPlugin.2" name="vlc" width="500" height="400" target="<?php echo 'http://mysite.com/abc.php?id='.$id; ?>" autoplay="true" loop="yes" volume="90"></embed>
      </object>
0

Can you please put the right php in example above?Thank you.

0

I have this error with that code Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' how can i fix that please.Thank you in advance.

0

As far as I can see the T_ECHO isn't comming from the piece of code you have posted. the error normally means there is a missing ; symbol near an echo statement.
Also if you don't want people to willing nilling to view abc.php then use the following code:

<?php session_start(); //line 1
$_SESSION['securityid']=dechex(microtime());
?><object id="vlc" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" width="500" height="400" events="True">
        <param name="AutoLoop" value="-1">
        <param name="AutoPlay" value="-1">
        <param name="ExtentWidth" value="11641">
        <param name="ExtentHeight" value="10371">
        <param name="MRL" value="<?php echo 'http://mysite.com/abc.php?id='.$id.'&sec='.$_SESSION['securityid']; ?>">
        <param name="Visible" value="0">
        <param name="Volume" value="90">
        <param name="StartTime" value="0">

		<param name="vlc2.jpg"> 
        <param name="BaseURL" value="http://www.mysite.com">
        <embed pluginspage="#" type="application/x-vlc-plugin" progid="VideoLAN.VLCPlugin.2" name="vlc" width="500" height="400" target="<?php echo 'http://mysite.com/abc.php?id='.$id.'&sec='.$_SESSION['securityid']; ?>" autoplay="true" loop="yes" volume="90"></embed>
      </object>

Then in abc.php place the following at the very top:

session_start();
if (!isset($_SESSION['securityid']) || !isset($_GET['sec']) || $_GET['sec']!==$_SESSION['securityid']) {
exit ('No hackers allowed. sorry :)');
}

Edited by cwarn23: spelling

0

Thank you so mutch ,now i get this error for this code
Cannot send session cache limiter - headers already sent (output started at/mysite my.php on line 23..dont know what to do.

0

I use only 2 files header and another 1 when embed direkt header with id.Header had path and in embed get id for header and for embed too,get id in same time.that abc.php in embed is header .

Edited by arjani10: n/a

0

Also note that when using the header(), session_start() and set_cookie() functions, you may not have any html or text output before the functions appearance. So according to the error you are receiving you have echoed something or put a white space before <?php causing the header function not to work properly.

0

Hello!My php is poor,i am sorry for that if is possible to have an example to do it please.I need encrypt that link in embed base64 or something more secure .Thank you guys.

Edited by arjani10: n/a

0

Hello! can somebody tell me please how to do it run this header with no access direct?Thank you .i have 2 php files
1.

<?php  
session_start();
if (!isset($_SESSION['securityid']) || !isset($_GET['sec']) || $_GET['sec']!==$_SESSION['securityid']) {
exit ('No hackers allowed. sorry :)');}
header("location:http://path/video?id=".$_GET['id']); 
?>

2-this is my embed

<?php if($id = $_REQUEST['id']){ } ?>
<?php session_start(); //line 1
$_SESSION['securityid']=dechex(microtime());
?><object id="vlc" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" width="500" height="400" events="True">
        <param name="AutoLoop" value="-1">
        <param name="AutoPlay" value="-1">
        <param name="ExtentWidth" value="11641">
        <param name="ExtentHeight" value="10371">
        <param name="MRL" value="<?php echo 'header.php?id='.$id.'&sec='.$_SESSION['securityid']; ?>">
        <param name="Visible" value="0">
        <param name="Volume" value="90">
        <param name="StartTime" value="0">
        <param name="vlc2.jpg"> 
        <param name="BaseURL" value="http://www.mysite.com">
        <embed pluginspage="#" type="application/x-vlc-plugin" progid="VideoLAN.VLCPlugin.2" name="vlc" width="500" height="400" target="<?php echo 'header.php?id='.$id.'&sec='.$_SESSION['securityid']; ?>" autoplay="true" loop="yes" volume="90"></embed>
      </object>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.