How to retrieve a string value from a PHP function call

Should this string be the return value of the PHP function?
Or should it be embedded in the response HTML? Any examples?

This is what I got so far:
footer.mxml in Flex Builder 3:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="ts_request()">
<mx:Script>
<![CDATA[
public function ts_request():void {
timestampRequest.send();
]]>
</mx:Script>
<mx:Canvas width="836" height="36"
backgroundColor="#05075C">
<mx:Label id="timestamp"
text="{timestampRequest.lastResult.timestamp}" color="#FEFEFE"
height="20" y="10" textAlign="left" width="221" x="10"/>
</mx:Canvas>
<mx:HTTPService id="timestampRequest" url="
http://www.ABC.com/timestamp.php"
useProxy="false" method="POST" />
</mx:Application>
Here is the timestamp.php on the www.ABC.com web server. I
have tested the php by directly access it with
"www.ABC.com/timestamp.php" and it shows the timestamp correctly:
<?php
putenv($timezone);
$Return = "<timestamp>".date("m/d/Y H:i:s", time())."
CST"."</timestamp>";
print($Return);
?>
When I run footer.mxml in Flex 3 Builder, I got an error:
This file cannot be launched.
Where did I do wrong?

Similar Messages

  • How to retrieve query string value from the URL in my portlet

    Hi,
    When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
    My URL will look like this.
    http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
    Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
    Please help me regarding this.
    Thanks in advance.
    Thanks,
    sreekanth.

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

  • How to send a String value  from Servlet to  Action class in Struts .

    when iam trying to send string value from Servlet to Struts Action class through Http Session, iam getting null value, iam really in big confusion, help me.

    please elaborate clearly or put you code of both action and servlet here
    Are both of them in same web application

  • How to retrieve the max value from a cursor in procedure

    Hi,
    In a procedure, I defined a cursor:
    cursor c_emp is select empno, ename, salary from emp where ename like 'J%';
    but in the body part, I need to retrieve the max(salary) from the cursor.
    could you please tell me how I can get the max value from the cursor in the procedure.
    Thanks,
    Paul

    Here is one sample but you should just get the max directly. Using bulk processing should be a last resort.
    DECLARE
      CURSOR c1 IS (SELECT * FROM emp where sal is not null);
      TYPE typ_tbl IS TABLE OF c1%rowtype;
      v typ_tbl;
      max_sal number;
    BEGIN
      OPEN c1;
      max_sal := -9999999999999;
      LOOP                                                 --Loop added
        FETCH c1 BULK COLLECT INTO v LIMIT 3; -- process 3 records at a time
            -- process the records
           DBMS_OUTPUT.PUT_LINE('Processing ' || v.COUNT || ' records.');
            FOR i IN v.first..v.last LOOP
                 if v(i).sal > max_sal then
                   max_sal := v(i).sal;
                 end if;
                DBMS_OUTPUT.PUT_LINE(v(i).empno);
            END LOOP; 
        EXIT WHEN c1%NOTFOUND;
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('Max salary was: ' || max_sal);
    END;
    Processing 3 records.
    7369
    7499
    7521
    Processing 3 records.
    7566
    7654
    7698
    Processing 3 records.
    7782
    7788
    7839
    Processing 3 records.
    7844
    7876
    7900
    Processing 2 records.
    7902
    7934
    Max salary was: 5000

  • How to get the string value from the RichSelectBooleanCheckBox component?

    I added a validator to a RichSelectBooleanCheckBox component which is binded to a String attribute of a View Object.
    I defined the mapping of boolean value to corresponding String value in the corresponding attribute binding in the page definition.
    When the validate() method of my validator was invoked, the new value passed to the validate method() was a Boolean value instead of the converted String value.
    I need to write validate() method generically so that it can handle more than one way of mapping boolean values to String values.
    How can I get the converted String value in my validator method() from the RichBooleanCheckBox component that was also passed to the validate() method as a parameter?

    use:
    int num = Integer.parseInt(s);

  • How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g

    Hi Every One,
    Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
    Thanks

    shuttle's valuechangeevent would fire when you shuttle items back and forth.
        public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
            ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
            if (list != null){
                for (int i=0; i<list.size(); i++) {
                    int l = list.size()-1;
                    val = list.get(l).toString(); //returns , delimited string
                    if (val != null){
                        val = val.replaceAll("[\\[\\]]", "");
                        StringTokenizer st = new StringTokenizer (val, ",");
                        int nto = st.countTokens ();
                        for (int j = 0; j < nto; j++)
                            String token = st.nextToken ();                     
                ..........

  • How to retrieving attributes old values from a OBJECT_CHANGED event

    Hi,
    I have installed Sun ONE Directory Server 5.2. I have registared Event Listener which implements both name space change and object change interfaces. After chaning some attribute value, i am able to get the new values of attributes using getNewBinging method. But when i call getOldBinding to get attributes, it is returning null. Can any one help me how to get the old values. This is very much urgent and we are trying to write custom connectors to synchronize the data in Sun ONE directory server with other directory servers like Oracle Internet Directory.
    I am new to Java and JNDI.
    It would be great help if any one can light me in this regard. Thanks in advance.
    Thanks & Regards
    Sreedhar

    I have been also working for the same issue. getOldBinding() does not return old attributes in case of ObjectChanged event. So far I did not find any solution. Does anyone know any solution?

  • How to retrieve a property value from an iview in the back-end?

    Hi,
    I am looking for a back-end function module or any other way to retrieve the property value of an iview in the portal.
    Is this possible?
    thanks,
    Bert Caryn

    Hi,
    Look at the following threads,
    For programmatically getting the iview properties,
    Programmatically getting iView Properties
    Also,
    Get Properties of IView Programmatically
    Permanent change of iView property programmatically
    Hope these threads help u.
    Regards
    Srinivasan T

  • How can i get currency values from flatfile to function module

    Dear All,
               I have to take  currency values from flat file and i have to assign those flat file value to function module .
    Eg: "Convert_to_local_currency".  I need technical code how to calculate those amount in work area and how to assign those amount value function module. 
              I need sample program for currency conversion from flat file to function module.  My requirement is based on flat file amount i have to calculate in work area and assign those work area to function module. 
    With Regards,
    Baskaran

    Hi Satish or Baskaran,
    First conform in which format the flat file is present, as abhi mentioned if it is there in notepad
    try to use F.M GUI_UPLOAD as shown below...
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
    FILENAME = 'C:\Desktop\rpf1.TXT'
    TABLES
    DATA_TAB =  ITAB.
    Now loop at ITAB Into Work_area and press the respect currency fields which you want and in the same way
    if the file is in EXCEL format use F.M ALSM_EXCEL_TO_INTERNAL_TABLE
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename = P_FNAME
          i_begin_col = 1
          i_begin_row = 1
        TABLES
          intern = ITAB
    LOOP AT ITAB INTO WA.
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
            EXPORTING
              foreign_currency = wa-waers
              local_currency   = wa-waers
               IMPORTING
              local_amount     = tvals-gross.
        ENDIF.
    endloop.
    And as mentioned loop the records into work area and process the currenct field which is present in the
    ITAB according to its field name. And make sure within the loop you call your function module.
    Regards
    VEnk@
    Edited by: Venkat Reddy on Dec 9, 2009 5:51 PM

  • How to pass a string value from XL sheet cell to SQL query.

    Hi,
    I am using SQL query in XL sheet to fetch some data. for that i am using ODBC connection. Now I want to pass a string from XL sheet Cell value in the where clause of Select statement, Please let me know how to do this.
    Below is My code:
    nge("A4").Select
    With ActiveSheet.QueryTables.Add(Connection:= _
    "ODBC;DRIVER={Microsoft ODBC for Oracle};UID=xyz;PWD=xyz;SERVER=xyz;" _
    , Destination:=Range("A4"))
    .CommandText = Array( _
    "SELECT CRYSTAL_REPORT1.PROJECT, CRYSTAL_REPORT1.OBJECT" & Chr(13) & "" & Chr(10) & "FROM NAIODEV.CRYSTAL_REPORT1 CRYSTAL_REPORT1" _
    .Name = "Query from gg"
    Thanks,
    Priya

    What does "XL" (whatever that is) have to do with Crystal Reports which is what you are obviously working with have to do with the Oracle database?
    The rules for using Crystal with Oracle are quite clearly described in all the Crystal Reports docs ... you MUST use IN OUT ref cursors unless you are doing direct table or view access.

  • How to extract sub string value from a string?

    Hi,
    I need to know how can i extract sub strings from a main
    string, something like this:
    main variable-------->"2087-5E2SE-19-JG7BC"
    i want to split it into like this:
    sub_main_1 variable---------> "2087"
    sub_main_2 variable---------> "5E2SE"
    sub_main_2 variable---------> "19"
    sub_main_2 variable---------> "JG7BC"
    I did the same in flash by using Split and arrays, like this:
    var my_str:String = "2087-5E2SE-19-JG7BC";
    var my_array:Array = my_str.split("-");
    for (var i = 0; i<my_array.length; i++) {
    trace(my_array
    this.aaa1 = my_array[1];
    this.aaa2 = my_array[2];
    this.aaa3 = my_array[3];
    this.aaa4 = my_array[4];
    My question is that how can i do the same in director ?? i
    haven't find any split function in director.
    Thanks in advance,
    Amir

    You do a similar thing in Director using the itemDelimiter,
    which is a
    _player object property in MX2004. By default, it's a comma:
    put _player.itemDelimiter
    It will let you get specific items within a string.
    p = "2087-5E2SE-19-JG7BC"
    _player.itemDelimiter = "-"
    put p.item[1]
    -- "2087"
    You could use it to write yourself a little split function:
    on split(theString, theDelimiter)
    oldDelim = _player.itemDelimiter
    _player.itemDelimiter = theDelimiter
    itemList = []
    repeat with cnt = 1 to theString.item.count
    itemList.add(theString.item[cnt])
    end repeat
    return itemList
    end
    p = "2087-5E2SE-19-JG7BC"
    a = split(p, "-")
    put a
    -- ["2087", "5E2SE", "19", "JG7BC"]
    Dave -
    Adobe Community Expert
    www.blurredistinction.com
    http://www.adobe.com/communities/experts/

  • How to retrieve line Item values from an object using groovy

    def RevenueObject = nvl(ChildRevenue,0);
    println('revenueItems==='+revenueItems.size());
    while(RevenueObject.hasNext())
    def revenueLine = RevenueObject.next();
    revenueLine.setAttribute('Test_c', 'Hello');
    } Groovy Scripting
    Error : Getting null value for Revenue object
    Exception in expression "OpportunityEO" trigger "getRevenueItems" : groovy.lang.MissingMethodException : No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)
    at "OpportunityEO" trigger "getRevenueItems" line 7
    No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)

    Depending on the message the line number might be in one of the fields:
    MESSAGE_V1
    MESSAGE_V2
    MESSAGE_V3
    MESSAGE_V4
    Although if the message simply is not meant to include the line number, it won't be there. That's the way it is. If there is a user exit available, you may add your custom messages with the line number. In some user exits (in sales order for sure) there is a special variable (flag), which is set when the BAPI runs the transaction.

  • How to extract a string value from a varchar column

    Hi,
    I've a varchar2 column which has got xml data. I want to extract the value of some tag <test></test>
    I can't use EXTRACT as the column is not XMLTYPE.
    Please suggest.

    Hi,
    make a new temporary table table wirth columns as the same name as TAGS in your XML.
    extract the XML in a temporary variable.
    pass it to the below proc with the table name created in step1 , it will populate the temporary table with the XML data.
    PROCEDURE prc_save_xml(
    iv_table_name IN VARCHAR2,
    ic_xmlstring IN CLOB,
    on_count OUT NUMBER,
    ov_remarks OUT VARCHAR2,
    ov_status OUT VARCHAR2,
    iv_row_tag IN VARCHAR2 DEFAULT 'ROW'
    ) IS
    insctx dbms_xmlsave.ctxtype;
    doc CLOB;
    BEGIN
    --Get a context handle
    insctx := dbms_xmlsave.newcontext(iv_table_name);
    dbms_xmlsave.setdateformat(insctx, 'YYYYMMDD');
    dbms_xmlsave.setrowtag(insctx, iv_row_tag);
    ov_remarks := 'Inserting now';
    on_count := dbms_xmlsave.insertxml(insctx, ic_xmlstring);
    ov_remarks := 'Inserted now';
    dbms_xmlsave.closecontext(insctx);
    --set return status as Success
    ov_remarks := 'Sucess';
    ov_status := gv_success;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('IN OTHERS :' || SQLERRM);
    ov_status := gv_failure;
    ov_remarks := ov_remarks || ':' || SQLERRM;
    on_count := 0;
    END prc_save_xml;

  • Retrieving  the score value from the captivate into flash

    Hi,
    We have used Captive 2 to built course & publishing it as
    a non e-learning output
    and loading the published swf file in custom built flash
    movie (wrapper).
    We have accessed some of the captivate variables to control
    the captivate swf.
    Does anyone know how to retrieve the score value from the
    captivate into flash ?
    Thanks
    Regards
    Chetan

    Hello,
    Use the Object Browser in .NET and search on "Summaryinfo" and you'll find the API to use.
    Thank you
    Don

  • How to get string value from xml in JSF??

    In JSF How to get string value from xml, .ini and properties file. I want to get string value from xml or text to JSF

    Just use the appropriate API's for that. There are enough API's out which can read/parse/write XML, ini and properties files. E.g. JAXP or DOM4J for xml files, INI4J for ini files and Sun's own java.util.Properties for propertiesfiles.
    JSF supports properties files as message bundle and resource bundle so that you can use them for error messages and/or localization.

Maybe you are looking for