×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    hi,
    POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help
    is there any way to send it

    actually post data is sent by adding query string like photo=sss
    at server side i recieve it by accessing $_GET['photo']
    i assume same with POST data also i.e
    at server side i want to recieve it by accessing $_POST['photo']
    please specify if there is other way of accessing POST data

    please help
    Last edited by lokesh_kumar_s; 2009-05-08 at 15:04.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,734

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    Note that neither $_GET['photo'] nor $_POST['photo'] seems to be Symbian C++. Php issues are just falling outside of the scope of this board.

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    hi i know that neither $_GET['photo'] nor $_POST['photo'] seems to be Symbian C++.but

    in the server side how can i access the post data sent by S60_Platform_HTTP_Client_API_Example_v2_1_en

    u can tell me how can i access the post data sent by S60_Platform_HTTP_Client_API_Example_v2_1_en application that is my question.

    see if at oneside i am sending the data thruoug POST method (using Symbian c++)i want to know how can i access it on the other side

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    Quote Originally Posted by lokesh_kumar_s View Post
    hi i know that neither $_GET['photo'] nor $_POST['photo'] seems to be Symbian C++.but

    in the server side how can i access the post data sent by S60_Platform_HTTP_Client_API_Example_v2_1_en

    u can tell me how can i access the post data sent by S60_Platform_HTTP_Client_API_Example_v2_1_en application that is my question.

    see if at oneside i am sending the data thruoug POST method (using Symbian c++)i want to know how can i access it on the other side
    As wiz has mentioned on this and on other threads created by you, the logic to get the data on the server has no real dependencies on what platform u r using to send the data from as long as you are following the right conventions. You can google to find code/help on the server side implementation.

    Cheers,
    Mayank

  5. #5
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    oh then i think there is a problem in the S60_Platform_HTTP_Client_API_Example_v2_1_en
    for sending POST data
    see because i am sending the POST data selecting the HTTP POST option in the menu.
    writing URL in the url field and writing POST data as photo=ggg in the POST DATA field
    and pressing send .

    at the other end in the server side i am trying to recieve it by $_POST['photo']
    or $_request['photo'] and both $_POST['photo'] and $_request['photo'] contains nothing please help where can i find the working example of HTTP POST

  6. #6
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    Quote Originally Posted by lokesh_kumar_s View Post
    oh then i think there is a problem in the S60_Platform_HTTP_Client_API_Example_v2_1_en
    for sending POST data
    see because i am sending the POST data selecting the HTTP POST option in the menu.
    writing URL in the url field and writing POST data as photo=ggg in the POST DATA field
    and pressing send .

    at the other end in the server side i am trying to recieve it by $_POST['photo']
    or $_request['photo'] and both $_POST['photo'] and $_request['photo'] contains nothing please help where can i find the working example of HTTP POST
    There is no problem with S60_Platform_HTTP_Client_API_Example_v2_1_en example. It is widely used example and works properly. You will have to verify your server side code.

  7. #7
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    hi Kamalakshan,
    the POST data variables are recieved in server side through php is like this
    $_POST['varname'] but not getting

    1>see in S60_Platform_HTTP_Client_API_Example_v2_1_en application for "Data to Post" field i am giving photo=ggg.is this is the correct way.
    2>or do i need to access any other POST variable like $_POST['data'] in the server side

  8. #8
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    I am not good with PHP. What you can do is use some packet capturing tools and verify the communication between the emulator and the server. Debugging this way might help you figure out what might be wrong.

  9. #9
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    hi kamalakshan, i am getting following as HTTP Request header
    POST /secure/photo.php HTTP/1.1
    Host: www.nelgosecurity.com
    Accept: */*
    User-Agent: SimpleClient 1.0
    Content-Length: 9
    Content-Type: text/plain

    photo=qqq
    please help

  10. #10
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Smile Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    Thanks kamalakshan U Given Me a Perfect Solution

  11. #11
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    Quote Originally Posted by lokesh_kumar_s View Post
    Thanks kamalakshan U Given Me a Perfect Solution
    So finally where did you find the problem...in the client side code or the server?

    Cheers,
    Mayank

  12. #12
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    finally i currected the KContentType as "application/x-www-form-urlencoded" rather than image/jpeg(in the client side) .
    but my task is to upload an image to the server i need to transfer the image through POST request.how can i do it?

    at client side i am copying file to Descriptor and try to transfer that discriptor throug POST request
    Code:
    iPostDataImage = HBufC8::NewL(aSize+10) ;
    TPtr8 aPtr = iPostDataImage->Des();
    //Obviously we have to read in the data to the iPostDataImage (ray)
    aFile.Read(0, aPtr, aSize);
    aFile.Close() ;
    aFs.Close() ;
    CleanupStack::PopAndDestroy(&aFs) ;
    but at server side
    Code:
    <?php
    echo "ex1";
    if(isset($_POST["photo"]) || isset($_REQUEST['photo']) || isset($_POST['photo']))
    {
    	echo "ex2";
    }
    ?>
    
    <?php  
    $photo=$_POST["photo"]; 
    $ourFileName = "jjjj.jpg";
    $fh = fopen($ourFileName, 'w') or die("Can't open file");
    fputs($fh,$photo,strlen($photo)); 
    fclose($fh);
    
    ?>
    i know i am wrong in some stages
    can you please correct me
    thanks

  13. #13
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    i have not got solution till now please answer to the above question

  14. #14
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    what is the problem you are facing now.

  15. #15
    Regular Contributor
    Join Date
    Jan 2009
    Location
    India,Karnataka
    Posts
    432

    Smile Re: POST of S60_Platform_HTTP_Client_API_Example_v2_1_en not working please help

    sorry kamalakshan i got the solution i tought i had informed about that in this forum but informed it in another forum

Similar Threads

  1. SetTime is not working in add call log event
    By keerthi.ck06 in forum Symbian
    Replies: 4
    Last Post: 2010-03-19, 01:03
  2. HTTP POST using Nokia 7650
    By mikael_kinnunen in forum Mobile Java Networking & Messaging & Security
    Replies: 8
    Last Post: 2008-08-19, 23:32
  3. No rule to male target
    By arayappan_it in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 4
    Last Post: 2008-02-28, 10:49
  4. Problems with http - POST
    By bigbadwolf in forum Symbian Networking & Messaging (Closed)
    Replies: 13
    Last Post: 2007-01-17, 23:45
  5. HTTP POST not working in Nokia Sport 5500
    By deepanjanghosh16 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2006-12-22, 22:08

Posting Permissions

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