473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need Help any PHP programer

Hi
Anybody can help who know PHP .
I want you to have look at this site first.
http://www.bigshotmedia.com
How this site use PHP to protect swf files to not download to cashin
temparary folder.
Anybody knows about this how PHP works or what is PHP script.
Thanks
Behzad Peivasteh
Jul 17 '05 #1
5 2247
pe*******@madaen.net (Peivasteh) wrote in message news:<6d*************************@posting.google.c om>...
Hi
Anybody can help who know PHP .
I want you to have look at this site first.
http://www.bigshotmedia.com
How this site use PHP to protect swf files to not download to cashin
temparary folder.
Anybody knows about this how PHP works or what is PHP script.


Didn't look at the site yet. Might be no-cache header trick
(<http://in2.php.net/header>)

--
"Success = 10% sweat + 90% tears"
If you live in USA, please support John Edwards.
Email: rrjanbiah-at-Y!com
Jul 17 '05 #2
Peivasteh wrote:
Hi
Anybody can help who know PHP .
I want you to have look at this site first.
http://www.bigshotmedia.com
How this site use PHP to protect swf files to not download to cashin
temparary folder.
Anybody knows about this how PHP works or what is PHP script.
Thanks
Behzad Peivasteh


You can never stop people from getting your .swf file.

At the end of the day, the browser will always receive a link to the
..swf file which they can just use a downloading program like wget to
fetch (or create a link in a HTML page and do "Save linked target as...").

Caching or no caching, Mozilla allows you to save ALL page attachments
through it's "page info" dialog box (gotta love Mozilla).

The best thing you can do is create a "shell" .swf file which makes
internal calls to the "main" .swf file when it runs [in the users
browser]. That means it doesn't matter if people download the .swf file
pointed to by the HTML, because they will only have the shell.

If someone was "really" keen, they could probably sniff the wire to see
what calls the shell .swf file was making and then duplicate the calls
to fetch all the component .swf file, but that would require a lot of
effort.

The other thing you can do to make it still harder, is to have the href
point to a php file with a session id (or some other key). The php file
then does something like

<?php // make sure no whitespace precedes the opener

if(is_valid_session($_REQUEST["sessid"])) {
header("Content-Type: application/swf;"); // I'm guessing this.
$fh = fopen($the_real_swf_location,"r");
fpassthru($fh);
fclose($fh);
die();
}
?>
<div class="warning">Oh no you don't...</div>

Of course, in the above example, you have to define the function
is_valid_session() and you have to populate the variable
$the_real_swf_location
Jul 17 '05 #3
Terence wrote:

<?php // make sure no whitespace precedes the opener

if(is_valid_session($_REQUEST["sessid"])) {
header("Content-Type: application/swf;"); // I'm guessing this.
$fh = fopen($the_real_swf_location,"r");
fpassthru($fh);
fclose($fh);
die();
}
?>
<div class="warning">Oh no you don't...</div>

Of course, in the above example, you have to define the function
is_valid_session() and you have to populate the variable
$the_real_swf_location


If you're really clever, you can create an extra key which is passed to
the shell .swf file which it then uses to request the child .swf files.
The child files also then have a corresponding PHP file which validates
the keys. This way, even wire sniffing would be subject to a current
session (or some other valid key).

But at the end of the day, there really is no way to completely ensure
that no one gets the contents. Unless.... Macromedia has some sort of
encryption capability built into .swf that you can use, but I am not a
flash expert.

I know with older versions of Flash, you could also get tools which
would reverse engineer .swf files and give you the actionscript source
as well as frame instance in an .fla file. So hardcoding encryption
stuff in actionscript would be no good to you. Macromedia might have
fixed the reverse engineering problem with their latest version of the
plugin. Then again, they may not have.
Jul 17 '05 #4
Terence <tk******@fastmail.fm> wrote or quoted:
Peivasteh wrote:

Anybody can help who know PHP .
I want you to have look at this site first.
http://www.bigshotmedia.com
How this site use PHP to protect swf files to not download to cashin
temparary folder.
Anybody knows about this how PHP works or what is PHP script.


You can never stop people from getting your .swf file.


Sure you can: Take your SWF file - and lock it into a large safe ;-)
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #5
Terence <tk******@fastmail.fm> wrote in message news:<40287886$1@herald>...
Terence wrote:

<?php // make sure no whitespace precedes the opener

if(is_valid_session($_REQUEST["sessid"])) {
header("Content-Type: application/swf;"); // I'm guessing this.
$fh = fopen($the_real_swf_location,"r");
fpassthru($fh);
fclose($fh);
die();
}
?>
<div class="warning">Oh no you don't...</div>

Of course, in the above example, you have to define the function
is_valid_session() and you have to populate the variable
$the_real_swf_location


If you're really clever, you can create an extra key which is passed to
the shell .swf file which it then uses to request the child .swf files.
The child files also then have a corresponding PHP file which validates
the keys. This way, even wire sniffing would be subject to a current
session (or some other valid key).

But at the end of the day, there really is no way to completely ensure
that no one gets the contents. Unless.... Macromedia has some sort of
encryption capability built into .swf that you can use, but I am not a
flash expert.

I know with older versions of Flash, you could also get tools which
would reverse engineer .swf files and give you the actionscript source
as well as frame instance in an .fla file. So hardcoding encryption
stuff in actionscript would be no good to you. Macromedia might have
fixed the reverse engineering problem with their latest version of the
plugin. Then again, they may not have.


Great explanation (after a longtime from Terence, Welcome
back:-)). I think, unless they invent some streaming protocols, they
can't stop someone from stealing.

--
"Success = 10% sweat + 90% tears"
If you live in USA, please support John Edwards.
Email: rrjanbiah-at-Y!com
Jul 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sofia | last post by:
My name is Sofia and I have for many years been running a personals site, together with my partner, on a non-profit basis. The site is currently not running due to us emigrating, but during its...
6
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
System login message says PHP is available, so I tried this: http://www.rawbw.com/~rem/HelloPlus/h.php It doesn't work at all. Browser just shows the source. What am I doing wrong?
0
by: Gregory Nans | last post by:
hello, i need some help to 'tree-ify' a string... for example i have strings such as : s = """A(here 's , B(A ) silly test) C(to show D(what kind) of stuff i need))""" and i need to...
29
by: RAY | last post by:
Hi , my boss has asked I sit in on an interview this afternoon and that I create some interview questions on the person's experience. What is C++ used for and why would a company benefit from...
162
by: techievasant | last post by:
hello everyone, Iam vasant from India.. I have a test+interview on C /C++ in the coming month so plz help me by giving some resources of FAQS, interview questions, tracky questions, multiple...
11
by: Harsimran | last post by:
I am a young C programer and want to increase my knowledge in C and also Like to get some money not more just a little .If u can help in getting me my pocket money or can help me in gaining my...
0
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need ...
15
by: Xah Lee | last post by:
2007-03-29 Dear tech geekers, In a couple of posts in the past year i have crossed-posted (e.g. recently “What are OOP's Jargons and Complexities”, “is laziness a programer's...
1
by: Abhinay | last post by:
Hi there, I am C++ programer, new in MySql database, I am using linux OS. Is MySql supports pear to pear replication ( I wanted to duplicate data of master database to salve database at run...
1
by: Abhinay | last post by:
hi there, I am a C++ programer working on linux OS, I wanted to know , whether linux supports persistanc RPC ( Remote procedure call ). I am aware about RPC supported by linux but I think it...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.