Results 1 to 3 of 3

Thread: Send response via php?

  1. #1
    Chillie in here j.o.s.h.1408's Avatar
    Join Date
    Dec 2005
    Location
    a place called home
    Posts
    8,545
    Thanks
    757
    Thanked
    256 times in 193 posts
    • j.o.s.h.1408's system
      • Motherboard:
      • ASUS P6T Delux
      • CPU:
      • Intel core i7 920 @ 3ghz
      • Memory:
      • 3GB DDR RAM
      • Storage:
      • 1TB Samsung F1, 500GB Seagate baracuda + 320gb Seagate PATA +150GB WD PATA
      • Graphics card(s):
      • EVGA 480GTX SC edition
      • PSU:
      • Seasonic M12 600W Module PSU FTW
      • Case:
      • Lian Li PC-A7010B (the rolls royce of pc cases)
      • Operating System:
      • vista ultimate edition and windows xp
      • Monitor(s):
      • 22inch 2005FPW dell monitor
      • Internet:
      • 24mb BE There Broadband

    Send response via php?

    Hi. am i right in saying that a simple echo $responseValue will return the responseValue variable to the client who had made a GET or POST request on my php file?

    im new to php and the main idea is that a client wherever if its a web browser or a third party app. they make a GET/POST on my php and i return a json array?

    will a simple echp $jsonArray work? i dont want to return no HTML page with json strings in it. i want to return just the json strings or whatever object i want.

    Thanks in advance.

  2. #2
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: Send response via php?

    You can use this function to create a json string: http://www.php.net/manual/en/function.json-encode.php

    So you could have "echo json_encode($myarray);" to do what you're thinking
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  3. Received thanks from:

    j.o.s.h.1408 (05-05-2010)

  4. #3
    Chillie in here j.o.s.h.1408's Avatar
    Join Date
    Dec 2005
    Location
    a place called home
    Posts
    8,545
    Thanks
    757
    Thanked
    256 times in 193 posts
    • j.o.s.h.1408's system
      • Motherboard:
      • ASUS P6T Delux
      • CPU:
      • Intel core i7 920 @ 3ghz
      • Memory:
      • 3GB DDR RAM
      • Storage:
      • 1TB Samsung F1, 500GB Seagate baracuda + 320gb Seagate PATA +150GB WD PATA
      • Graphics card(s):
      • EVGA 480GTX SC edition
      • PSU:
      • Seasonic M12 600W Module PSU FTW
      • Case:
      • Lian Li PC-A7010B (the rolls royce of pc cases)
      • Operating System:
      • vista ultimate edition and windows xp
      • Monitor(s):
      • 22inch 2005FPW dell monitor
      • Internet:
      • 24mb BE There Broadband

    Re: Send response via php?

    awsome thanks. will try this tomorrow.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP Windows vs PHP Linux
    By Raz316 in forum Software
    Replies: 5
    Last Post: 15-12-2008, 02:16 PM
  2. TFT Response Times
    By Matt1eD in forum Graphics Cards
    Replies: 25
    Last Post: 25-02-2005, 09:19 PM
  3. TFT monitor - help on response times!
    By pink-fairy in forum Help! Quick Relief From Tech Headaches
    Replies: 6
    Last Post: 27-10-2004, 04:44 PM
  4. Why response times of LCDs are misleading
    By Carvahlo in forum Graphics Cards
    Replies: 9
    Last Post: 23-09-2004, 08:35 PM
  5. Eclipse ADSL send BT Openworld Emails?
    By dawson in forum Networking and Broadband
    Replies: 5
    Last Post: 22-12-2003, 05:15 PM

Posting Permissions

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