Use a GET request.

<?php

  $prop = '({"prop":1})';
  $stuff = $_GET["jsoncallback"] . $prop;

  echo $stuff;

?>

On Jun 26, 2:38 pm, wellmoon <[EMAIL PROTECTED]> wrote:
> After more research I discovered for jsonp callbacks to work, the PHP
> needs to return the name of the function as well as (which the flicker
> service does in the $.getJSON example), so I added this to the PHP
> file. For reference the PHP file now consists of this:
>
> <?php
>
>   $stuff = "myCallback ({'prop':1)";
>
>   echo $stuff;
>
> ?>
>
> However, the page is still not working! Firebug now reports the error
> 'myCallback is not defined', but I thought jQuery was supposed to
> using the jsoncallback=? query parameter?
>
> I guess this must be a problem with the PHP?
>
> Does no one know this or am I just posting in totally the wrong place?

Reply via email to