Skip to Content

Swish insted of flash

Hello

In a privious posting was a discussion about loading data into a flash movie.

I'm using a simpler flash-like Tool called Swishmax.

One way to load data into this tool is via a php script (would it be wrong to call this PHP script a web service ?)

In this example the variable this.time will get a time value in the format HH:MM:

In the Swishmax script i write something like:

this.time = "time";

this.loadVariables("http://www.someurl.dk/time.php",'GET');

The time.php file is something like:

<?php

echo "&time=";

print (date ("H:i"));

?>

I'm a BSP beginner and my question is: How would this PHP script look like in BSP ?

Best regards

Thomas Madsen Nielsen

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Oct 03, 2003 at 09:28 AM

    Hallo Thomas,

    An interesting problem the morning brings.

    First, let me give you a perspective approach that I always use. You must image the browser and server as two boxes. In between them is a long pipe. Now we put our eye into this pipe and look at what is happening. And we realize immediately that all we see in this pipe is HTTP traffic. The pipe (and therefor the browser) knows nothing about BSP, PHP, JSP, Java, etc. All the pipe knows is that somebody wrote HTTP traffic into it. But I suspect you already know this :).

    So first step, let us fix the Swishmax script to load a BSP page directly from your application.

    this.time = "time";

    this.loadVariables("time.php",'GET');

    You see in the above I leave the ".php" extension. Theorectically it plays no role. However, what I change, and I am not sure if SwishMax can handle this, is the URL. Now we use a relative URL which should be relative to the place from where the script was loaded. It is your homework to check that Swishmax (nice sound) can actually handle relative URLs. Otherwise back to full URL.

    Next step we create a new BSP page in our application, and call it: "time.php". Now comes my biggest problem, I don't know PHP, and am not sure what means the &Time, nor how the date will be formatted with "H:i". The first version of the BSP page will be:

    Time=<%=sy-uzeit%>

    You might require a little more to get the formatting correct. I have previously post in this forum a list of string operators and commands available in ABAP. You can read up on this in ABAP online documentation.

    The last thing you must check is the mimetype. I don't know what PHP sets by default for a .php page. And what mimetype Swishmax expects. By default, for this extension we set "application/octet-stream". You can goto properties tab and change it to "text/html" if you want.

    Output from text: "Time=073225"

    brian

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      for german readers try selfHTML (http://selfhtml.teamone.de). It is an online documentation and free of charge.

      Very nice manual for HTML, XHTML, CSS, XML, DTDs, JavaScript, DOM, DHTML, CGI, Perl and PHP. Especially the HTML, CSS, JavaScript and DOM parts are great.

      I'm using it on a every-day basis and it saves me a lot of time...

      Bye,

      Alex