Help Secure your XML data - Solution-ish

Note: Possibly posting this in the wrong forum, Mods feel free to remove or correct.
This should add a small amount of deterance to someone stealing your data by
bypassing your flash .swf and just grabbing your xml file to parse themselves.
File name and variable names of course can be changed, simply keeping
with the example I'll keep them all what they should be for this
example to actually work.
** Description: This will let your change your secretValue for your
secretVariable on your flash program and not give you any downtime
when you upload your flash file with the new secretValue.
Just remember to change the values stored in your php file after
you uplaod your flash doc with the new secretValue. As people can
see the value you send to get your xml file it's not safe for long, if you
use this idea you'll have to keep up with changing your secretValue to
make it less desirable for pirates to get your info. In essance this solution
is designed to bring the end users of the data into the fold helping you decide
which ip's to potentially block or whatever action you see fit.
$current_check_value - should always be what your password for the live
flash doc is.
$when_updateFlash_check_value - should always be what your next password
will be next time you upload your flash doc.
Hope you like it.
By: Chuck Mongillo
// PHP File: The XML responder - sends out the xml data
<?PHP
File Name: MyXMLfile.php and it would be held in
Path: http://www.MyServer.com/MyPath/
// If your server requires you to specify your incoming variables
// Uncomment this next line.
// $secretVar = $_GET['secretVar'];
// Tell your PHP file which passwords it will accept for right now
// and the password it will accept after you update your flash .swf
// so there is no downtime for your real project. Downside - your
// always allowing 2 possible ways in, ie: 2 passwords.
$current_check_value = "PiratesAreBad";
$when_updateFlash_check_value = "AreUaPirate";
if(($current_check_value != $secretVar)&&($when_updateFlash_check_value != $secretVar)){
     // My current .swf secretValue and my updated .swf secretValue failed
     // Give the pirate a slap
     echo("
     <?xml version=\"1.0\" encoding=\"utf-8\"?>
     <myRoot>
          <myXMLValues>
               <happyData>This data was stolen from MyServer.Com</happyData>
               <happyData>Please report it. Bad Pirate No Donut!!</happyData>
          </myXMLValues>
     </myRoot>
     // Stop further execution of this file
     exit;
} // End bad password check
else{
     // Yay, its (seems to be) my .swf calling the program
     // Give the proper data
     echo("
     <?xml version=\"1.0\" encoding=\"utf-8\"?>
     <myRoot>
          <myXMLValues>
               <happyData>Tomorrows Winning Lotto Number is:</happyData>
               <happyData>1 - 2 - 3 - 4 - 5 - 6</happyData>
          </myXMLValues>
     </myRoot>
} // End good passsword check
?>
// Flash AS3 code: The data request
// In your flash document you should have something like this to pull your xml file:
// Set a string to hold your xml path and secret value to check against
secretValue:String = "PiratesAreBad";
myXMLurl:String = "http://www.MyServer.com/MyPath/MyXMLfile.php?secretVar=" + secretValue;
// Set xml and loader variables
var MyXMLloader:URLLoader = new URLLoader();
var MyXMLData:XML;
// Get your XML
MyXMLloader.load(new URLRequest(myXMLurl));
MyXMLloader.addEventListener(Event.COMPLETE, gotMyXMLData);
function gotMyXMLData(e:Event):void
     MyXMLData = new XML(e.target.data);
     MyXMLloader.removeEventListener(Event.COMPLETE, gotMyXMLData);
     // Still not sure why removing a listener requires a call to a function.
     // Expecially why people use it in the same funciton it sits in.
     // But, now you have your xml data.
     If you have other ideas or want to expand on this one feel free, thanks.

{forum:id=34} is the correct forum to this, and as I see you have already double-posted to there, I suggest that you close this thread.

Similar Messages

  • Little help with complex XML data as data provider for chart and adg

    Hi all,
    I've been trying to think through a problem and Im hoping for
    a little help. Here's the scenario:
    I have complex nested XML data that is wrapped by subsequent
    groupings for efficiency, but I need to determine if each inner
    item belongs in the data collection for view in a data grid and
    charts.
    I've posted an example at the bottom.
    So the goal here is to first be able to select a single
    inspector and then chart out their reports. I can get the data to
    filter from the XMLListCollection using a filter on the first layer
    (ie the name of the inspector) but then can't get a filter to go
    deeper into the structure in order to determine if the individual
    item should be contained inside the collection. In other words, I
    want to filter by inspector, then time and then tag name in order
    to be able to use this data as the basis for individual series
    inside my advanced data grid and column chart.
    I've made it work with creating a new collection and then
    looping through each time there is a change to the original
    collection and updating the new collection, but that just feels so
    bloated and inefficient. The user is going to have some buttons to
    allow them to change their view. I'm wondering if there is a
    cleaner way to approach this? I even tried chaining filter
    functions together, but that didn't work cause the collection is
    reset whenever the .refresh() is called.
    If anyone has experience in efficiently dealing with complex
    XML for charting purposes and tabular display purposes, I would
    greatly appreciate your assistance. I know I can get this to work
    with a bunch of overhead, but I'm seeking something elegant.
    Thank you.

    Hi,
    Please use the code similar to below:
    SELECT * FROM DO_NOT_LOAD INTO TABLE IT_DO_NOT_LOAD.
    SORT IT_DO_NOT_LOAD by WBS_Key.
        IF SOURCE_PACKAGE IS NOT INITIAL.
          IT_SOURCE_PACKAGE[] = SOURCE_PACKAGE[].
    LOOP AT IT_SOURCE_PACKAGE INTO WA_SOURCE_PACKAGE.
            V_SYTABIX = SY-TABIX.
            READ TABLE IT_DO_NOT_LOAD into WA_DO_NOT_LOAD
            WITH KEY WBS_Key = WA_SOURCE_PACKAGE-WBS_Key
            BINARY SEARCH.
            IF SY-SUBRC = 0.
              IF ( WA_DO_NOT_LOAD-WBS_EXT = 'A' or WA_DO_NOT_LOAD-WBS_EXT = 'B' )     
              DELETE IT_SOURCE_PACKAGE INDEX V_SYTABIX.
            ENDIF.
    ENDIF.
          ENDLOOP.
          SOURCE_PACKAGE[] = IT_SOURCE_PACKAGE[].
        ENDIF.
    -Vikram

  • Need help in storing XML data in SQL server using EJB

    Hi all...
    i have one XML file and i need to store the data of XML in one of the table of SQL server ..i want to do this using EJB..
    like this
    Example :
    Data i XML :
    ========
    <Employee>
    <Details>
    <empid> 101 </empid>
    <name> Ajitha </name>
    </Details>
    </Employee>
    Table i have Created in SQL SERVER:
    ==============================
    Empid || name
    Final output should be :
    =================
    Empid || name
    101 || Ajitha

    HI,
    Please check your settings as per following.
    Goto T code> DC20>Define data carrier type "server, front end"---> Then check the setting as per below
    Type             Description                    Path                       Online
    PC      give descriptio             maintain path         Tick
    Then Select this entry and click on " Define servers and files or folders"--->Then check the setting as per below
    Data Carrier       Type       Description
    DEFAULT           PC           default
    Then Select this entry and click on "Identify front computer"--> Then check the setting as per below
    Data Carrrier      Type        Net. address        Description
    Default          PC     DEFAULT            Default for local PC
    I have explained above so that u can co relate your settings with above..
    I hope this will help you.
    Thanks
    Yogesh

  • Help for retrieve xml data from database.

    Hello friends,
    I am inserting xml file into oracle database.
    column name is xyz_xml and data type is XMLType.
    I have successfully inserted that.
    But My problem is How can i retrieve that xml file from database and can view in explorer as a text.
    If any one have any idea than let me know.
    Thanks

    Hello Friend...!
    I am getting the following error and i am not figure out this error :
    NosuchfieldException : conversionPlease Help me.

  • I need help quick - battery and data - solutions please?

    I have an iPhone 4 here in Canada on the Telus network.I have upgraded to iOS6. The last 4 days the battery has been draining very quickly, by 2pm its less than 10%. The phone is also getting very hot. Today I received a message that I have used 95% of my 1 GB of data, a message I have never seen before.
    So far I have:
    -turned off almost all notifications
    -turned off locations in almost all apps (maps of little value without it)
    -changed from push email to fetch
    -deleted all recently added apps
    Any thoughts on how to rectify the issue?

    To start with, the SprymenuBar is not suited for touch screens, it will not work.
    You are better off using a jQuery or a commercial menu.
    Even then, you must provide the styling rules for the different widths. Fixed widths, such as those in the SpryMenuBar are a no no.
    Have a look here http://www.projectseven.com/products/templates/pagepacks/css-builder2/index.htm to see what happens when you go to narrower screens sizes or here http://foundation.zurb.com/page-templates/homepage-1.html. The former is a commercial product, the latter is free of charge.

  • How to formulate SQL that need to use some XML data in a clob?

    Hi,
    We just created a new 8i table that has some regular fields as well as a clob field that contains XML data. How could I bring back the value of a spcific element in the XML field and compare it against a regular field? For example, I want to make sure the value in field A is not the same as the value of a specific element in field b. Your help is very much appreciated.
    select * from X
    where X.a <> X.b.elementZ

    Depending on how complex your XML data is, you can write a simple function that does a string search of the CLOB and returns the value of the tag you are looking at. Then you can compare the value of the tag and the value of the the column.
    select * from X
    where x.a <> getTagValue(X.b,'elementZ')
    Check out the DBMS_LOB package.

  • Insert XML Data Into An Existing PDF Form

    I am working on an application, written with XHTML and JavaScript, and running on AIR, so it is a desktop application.
    Users enter data into an XHTML form and upon submission I create an XML file of the data using JavaScript.
    At any later time users will be able to open the XML file from the application. I will use JavaScript, again, to read the XML and fill in an XHTML form. But at this point I will provide a button for users to generate a PDF with the data. I would then like to insert the XML data into the appropriate fields of the existing PDF form. I would like to continue to do this from within the AIR application using JavaScript.
    Is this possible?
    What version of Acrobat would I need as the developer? Professional or Standard or Other or None?
    What version of Acrobat would the end users need? Professional or Standard or Other or None?
    Can this all be done using only JavaScript and the Acrobat SDK? Does using AIR offer any help (all Adobe products)?
    When the end user clicks the generate PDF button would Acrobat have to open? Can this be done without the user seeing Acrobat open? Either way is ok, I would just like the user to see an alert saying that the file has be generated and point them to its location on the local machine. But again, this is not a requirement.
    Thanks in advance.
    Not asking for source code here, just if its possible. :)
    I'll figure out the how.

    You have two choices
    1) You can use JavaScript in your AIR application to communicate with the JavaScript in the PDF to fill in the form directly. This can all be done inside of your AIR app. This is certainly the best route to go and there is (IIRC) a sample in the AIR SDK.
    2) You can create an XFDF file from your XML data and then have Acrobat/Reader open the XFDF file to fill in the data.
    Both methods will work with Acrobat and Reader - HOWEVER, Reader users won't be able to save the PDF unless it has been Reader Enabled.
    Leonard

  • FDTA - XML data display

    Hi Gurus,
    I have generated a file using F110 tcode..a XML file is created in FDTA tcode(DMEE tree file)...there are 2 ways of viewing that file in FDTA tcode..first one is directly select that file and click on display button(the file will be opened in the XML format)..second way is downloading the file to local desktop and viewing that file...the problem i am facing is...when i select the display button the file is opening in XML format but the file is not displaying completely- after certain line items the data is getting truncated..for suppose if i have around 60 transactions,it is disapying only 20 line items..but when i see the same file which is downloaded to local desktop,i can see the complete file..Are there any settings to be done for viewing the file completely in FDTA tcode..?
    Pls help

    Just to combine the response from steve into mine
    To prepare your design*
    1) create a xmlSchema that correspond to your document structure
    2) use jaxb, castor or top link to generate java class to manipulate this content into a java application
    3) import these classes into your jdev project
    In the jdev application_
    ui layer
    Create a data control from xml mapped java classes (use the main object)
    Use this data control structure to create ui component, including the method that check the content from the xmlSchema (castor)
    middle tier, mapping
    Take you xml content as CLOB from the database. Create a business component for this step. Get the xml content as a string (or stringBuffer if I remembering correct). Use this object to load the content into you xml java mapped interface (you will find the method in the object to achieve this step, marshal/unm,unmarshal).
    Your xml data will be shown in you ui interface depending on the xml structure (and not as simple xml text, that you don't want I suppose).
    To save the editing, you will have to transform you java object into plain xml (marshal/unmarshal), obtain a string again, load it into the business content and save it into the database.
    Hope it's help you

  • Xml data display in ADF

    In ADF, I need to display a column from a table which is of xml data type. I get this oracle.sql.OPAQUE error in the column. Is there any other way to display the xml data type? Your help is really appreciated. Thanks.

    Just to combine the response from steve into mine
    To prepare your design*
    1) create a xmlSchema that correspond to your document structure
    2) use jaxb, castor or top link to generate java class to manipulate this content into a java application
    3) import these classes into your jdev project
    In the jdev application_
    ui layer
    Create a data control from xml mapped java classes (use the main object)
    Use this data control structure to create ui component, including the method that check the content from the xmlSchema (castor)
    middle tier, mapping
    Take you xml content as CLOB from the database. Create a business component for this step. Get the xml content as a string (or stringBuffer if I remembering correct). Use this object to load the content into you xml java mapped interface (you will find the method in the object to achieve this step, marshal/unm,unmarshal).
    Your xml data will be shown in you ui interface depending on the xml structure (and not as simple xml text, that you don't want I suppose).
    To save the editing, you will have to transform you java object into plain xml (marshal/unmarshal), obtain a string again, load it into the business content and save it into the database.
    Hope it's help you

  • Help Needed Importing XML into a Database

    Hi:
    I'm new to Appleworks databases. I would like to create a database by importing records from a large XML file containing thousands of records. Is there a user's guide (or something else) I could read to help me do this? I have the schema for the XML file.
    Thanks,
    -AstraPoint

    I'm new to Appleworks databases. I would like to
    create a database by importing records from a large
    XML file containing thousands of records. Is there a
    user's guide (or something else) I could read to help
    me do this? I have the schema for the XML file.
    AppleWorks is a flat-file database and not a relational database. It will import ASCII text files ie tab-delimited data (TSV file format).
    You need to write an XSL template to convert your XML data into a TSV or CSV. I'd be surprised if there already wasn't the basics of a XSL template that could do this on Google.

  • How do I use the Session State to manage bind variables & download xml data

    I have a Report Query with more than 30 queries; many have bind variables in them. I'd like to create sample xml so that I can develop my word templates. When I try to download the XML data Source for Layout, it doesn't ask for the bind variable values.
    How can I download the XML data without replacing the bind variable values in each of the queries?
    Thank you.

    If you are using the Standalone version, then first of all make sure to UNCHECK (BIP10g 10.1.3.4.1)
    "AUTO RUN" (it is under General Settings when you select your Report Definition)
    Next, you should define the parameters in the corresponding parameter Section.
    Its simplest form is of "Text" type so you will have to enter values at runtime.
    Then these parameters can be used in your query as bind variables.
    When you run the report it will prompt for parameter values. Enter these values
    and you would get a sample of your XML data.
    This should work and you should not find any issues.
    regards
    Jorge

  • About the exporting and importing xml data file in the pdf form

    Hi all,
    I need help for importing xml data file in the pdf form. When I write some thing in the text field with fill color and typeface (font) and exported xml data using email button. When I imported that xml file in the same pdf file that is used for exporting the xml data then all the data are shown in the control but not color and font typeface. Anyone has suggestion for solving this problem. Please help me for solving this problem.
    Thank you
    Saroj Neupane

    Can you post a sample form and data to [email protected] and I will have a look.

  • Xml data output problem

    I have table xxemp(No number, Text varchar2(250)), i have created a report and generate xml file and create temple and load data and insert all
    field and when i preview the data in rtf formate at that movement data is not shown in the text field not display.In text field content 3 line of data
    Thanks
    837

    please make sure, your xml data file has some data in it. and when the rtf is made view the output their itself.
    let me know the steps you have followed.
    Thanks
    Ud.

  • DSC with XML data type

    Hi,
    Can someone explain to me what the difference is between the xml data type and the Document data type in workbench? I would like to use the xml datatype in my DSC thinking it is most likely the best representation of an xml string. But I've heard that Document is more widely used and that it can represent an xml entity as well. Is this right?
    My ultimate goal is to write a DSC and use a type that represent an xml string. I would like the component.xml to have the type for my input variables to automatically be typed as "xml" or "document" (whatever the one i should be using is).
    I tried creating variables of both types ("xml' and "document", lower case d) and have those passed into my DSC for inspection. The object passed in are as follows:
    xml: org.apache.xerces.dom.DocumentImpl
    document: com.adobe.idp.Document
    But if I use any of those in my component.xml, workbench is typing my variables as "DocumentImpl" or "Document".
    Any ideas?
    Thanks in advance!
    Nic

    The xml variable (org.w3c.doc.Document) is a native xml data type. That means you can use xml functions and/or xPath expressions on the content of the variable.
    The document variable (com.adobe.idp.Document) is a more generic data type that can store any binary data. If you happen to store xml in that data type, you won't be able to run xml functions or xPath expression directly on the variable content since it's treated as binary data.
    If  you don't need to manipulate or access the content of the xml, then either data types will work. Otherwise, I would use the xml data type.
    In your component xml, make sure your xml data type is set to org.w3c.doc.Document and you'll see xml in Workbench.
    Jasmin

  • Showing XML data

    Hi all,
    i have to create a table in the DDIC where i have to store some XML data and informations.
    ID -> char
    date -> date field
    desc -> char
    xml -> ????
    What datatype shall i use to store my XML Data ?
    Later in a Dynpro i need to show this XML Data. What type of control shall i use to show this XML Data ?
    Can i use the browser control ? If so ... how can i pass my xml data to this control ??
    Greetings
    Henning

    You can create a field of data type STRING if you are planning to store your XML in string or RAWSTRING if you are planning to store your data in XSTRING.
    You can use the Simple CL_GUI_HTML_VIEWER to display your XML data stored in STRING or XSTRING. Take a look at the FM DISPLAY_XML_STRING.
    Regards,
    Naimesh Patel
    Edited by: Naimesh Patel on Feb 12, 2009 10:19 AM

Maybe you are looking for

  • Service Pack for Proliant installing successfully but returning failure in OSD task sequence

    Building bare metal servers with SCCM 2012 SP1 CU2 OSD and running into an issue with HPs where they attempt to install the Service Pack for Proliant 2013.02.0.  I am using a package with a program.  Here is the program command line: Hpsum.exe /use_l

  • 1 update which is not under my account??

    I have an update for Angry Birds in my mac app store.. two problems.. A.  I don't have Angry Birds even installed B.  If i click update it tells me this:  "Sign in to [email protected] to update applications for that account." This is not my email an

  • Annoying dialogue box that won't disappear

    I just updated Snow Leopard to 10.6.4 and it came with an unwanted guest. In the lower right corner of my screen sits a yellow dialogue box that says: "Open as a normal image. Option-click...." It persists in every ap that I run. Any suggestions on h

  • Calling tcode using link to url

    hi friends, i want to call tcode SE38 in webdynpro application by using linktourl. here i am going to shuffler system webgui in internet service and then right click on it then  publish->complete service. and later i am going to tcode sicf here i am

  • Migration of content from Subversion repository

    Hi.  I'm trying to migrate some content from some subversion (svn) repositories into SharePoint document libraries.  Since I don't currently have .NET-based svn-reading capabilities, I've got my content in another application that was then calling in