A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How to detect swf movie with php

  1. #1
    Junior Member
    Join Date
    Sep 2001
    Posts
    6
    Hi,

    I have a swf movie contacting a PHP script with loadvariables(), the variables are being sent with "POST".

    I would like to detect within the PHP script if the script was called by the swf and whithin my domain. Anyone knows how can I do it? Passing a variable inside the swf would be the easier way, but it would be a security breach because with the proper software anyone can open the swf and read the variables I'm sending. So I'm looking for some kind of internal variables being sent by the SWF.

    Any help would be appreciated,

    Kind Regards

    Helio


  2. #2
    Senior Member
    Join Date
    Mar 2002
    Posts
    161
    Use the PHP $HTTP_REFERER to check which page called the script.

    http://www.php.net/manual/en/languag...predefined.php

  3. #3
    Junior Member
    Join Date
    Sep 2001
    Posts
    6
    Hi,

    Thank you for replying.
    That was my first idea, the problem is that $HTTP_REFERER is not defined when the script is called by the swf

    I can't figure out why...

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    you could use php sessions.
    The only place where a movie could call your script from, other than your domain, is someone's local flash player. In that case there would be no open session (session should be opened by loading the html container for the swf)
    To distinguish between a html form and a swf, load some data from the server, process it within the movie, and send it back along with the data you really want to send

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center