How to get field name from posted URL in php
<p>I want to write a php file that return the posted value as json array.I used the following code to write that an it returing values as json array.</p>

<pre><code>$camp = $_REQUEST['ldy_camp'];  
$key = $_REQUEST['ldy_key'];    
$visit = $_REQUEST['ldy_visit'];        
$ref = $_REQUEST['ldy_ref'];    
$time = $_REQUEST['ldy_time'];  

$response["ldy_camp"] = $camp;
$response["ldy_key"] = $key;
$response["ldy_visit"] = $visit;
$response["ldy_ref"] = $ref;
$response["ldy_time"] = $time;

echo json_encode($response);
</code></pre>

<p>It returns value when i use url like this:</p>

<pre><code>http://php.cynere.net/test/ajax.phpajax.php?ldy_camp=hello&amp;ldy_key=keyvalue&amp;ldy_visit=visit_value&amp;ldy_ref=reference&amp;ldy_time=time%20value
</code></pre>

<p>But my problem is when i pass some unknown values to url like this:     </p>

<pre><code>http://php.cynere.net/test/ajax.phpajax.php?unknown=some values  
</code></pre>

<p>it should php file should return the unknown value as json array</p>
