Jump to content

Duderino7

New Members
  • Posts

    1
  • Joined

  • Last visited

Duderino7's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have an incoming http post that has multiple elements in one parameter that I need to parse as an array. I'm not a coder, but I can dabble and implement code. My programmer is on vacation. I should also mention that in my index.php I have another similar piece of code that parses a json string from another posting source. Here's what that code looks like: if (isset($_REQUEST['data_json'])) { $json_data = json_decode($_REQUEST['data_json'], true); $_REQUEST = array_merge($_REQUEST, $json_data); foreach ($_REQUEST as $key => $value) { if (is_array($_REQUEST[$key])) $_REQUEST[$key] = $_REQUEST[$key][0]; } } If you look below at [REQUEST_URI], that has the data I want parsed . But I have other similar posts from other sources that have the [REQUEST_URI] that I do not need parsed, so there would have to be a rule distinguishing this post type from others. The unique identifier is the [source_slug] at the top. ***********1433984376************ Array ( [source_slug] => callrail ) Array ( [PATH] => /sbin:/usr/sbin:/bin:/usr/bin [PP_CUSTOM_PHP_INI] => /home2/ezcrweb.com/etc/php.ini [FCGI_ROLE] => RESPONDER [REDIRECT_PP_CUSTOM_PHP_INI] => /home2/ezcrweb.com/etc/php.ini [REDIRECT_STATUS] => 200 [HTTP_HOST] => ezcrweb.com [HTTP_X_REAL_IP] => 199.182.122.43 [HTTP_X_FORWARDED_FOR] => 199.182.122.43 [HTTP_X_ACCEL_INTERNAL] => /internal-nginx-static-location [HTTP_CONNECTION] => close [CONTENT_TYPE] => application/json [HTTP_X_NEWRELIC_ID] => VQMHWFJSGwIHVlJTBgc= [HTTP_X_NEWRELIC_TRANSACTION] => PxRWUAdXC1ZSUlBbBVMPBwIFFB8EBw8RVU4aAwlZAAFWBw9QCFNRWgVQA0NKQQwGCVJRUgJTFTs= [CONTENT_LENGTH] => 1061 [sERVER_SIGNATURE] => Apache Server at ezcrweb.com Port 80 [sERVER_SOFTWARE] => Apache [sERVER_NAME] => ezcrweb.com [sERVER_ADDR] => 10.182.162.130 [sERVER_PORT] => 80 [REMOTE_ADDR] => 199.182.122.43 [DOCUMENT_ROOT] => /home2/ezcrweb.com/httpdocs [sERVER_ADMIN] => gary@ezcrfinancial.com [sCRIPT_FILENAME] => /home2/ezcrweb.com/httpdocs/leads/index.php [REMOTE_PORT] => 57665 [REDIRECT_QUERY_STRING] => source_slug=callrail [REDIRECT_URL] => /leads/callrail [GATEWAY_INTERFACE] => CGI/1.1 [sERVER_PROTOCOL] => HTTP/1.0 [REQUEST_METHOD] => POST [QUERY_STRING] => source_slug=callrail [REQUEST_URI] => /leads/callrail?callercity=Phoenix&callercountry=US&callername=Person+Joe&callernum=%2B16025540000&callerstate=AZ&callerzip=&callsource=keyword&datetime=2015-06-11+00%3A41%3A53&destinationnum=8019216388&first_call=true&gclid=CjwKEAjwwN-rBRD-oMzT6aO_wGwSJABwEIkJdO3j8lr7vjruFXpHqxxRzgMmVXPtdCvKPCq5tLImQBoC4bvw_wcB&id=314653359&ip=172.56.17.134&keywords=+get++out++car&landingpage=http%3A%2F%2Fbadautodebt.com%2Fget-car-back-az-simpson%2F%3Fkeyword%3D%252Bget%2520%252Bout%2520%252Bcar%26gclid%3DCjwKEAjwwN-rBRD-oMzT6aO_wGwSJABwEIkJdO3j8lr7vjruFXpHqxxRzgMmVXPtdCvKPCq5tLImQBoC4bvw_wcB&referrer=direct&referrermedium=CPC&trackingnum=%2B14804851256&transcription=&utm_campaign=&utm_content=&utm_medium=&utm_source=&utm_term=&utma=206296960.171304145.1433983274.1433983274.1433983274.1&utmb=206296960.1.10.1433983274&utmc=206296960&utmv=&utmz=206296960.1433983274.1.1.utmgclid%3DCjwKEAjwwN-rBRD-oMzT6aO_wGwSJABwEIkJdO3j8lr7vjruFXpHqxxRzgMmVXPtdCvKPCq5tLImQBoC4bvw_wcB%7Cutmccn%3D%28not+set%29%7Cutmcmd%3D%28not+set%29 [sCRIPT_NAME] => /leads/index.php [php_SELF] => /leads/index.php [REQUEST_TIME] => 1433984376 )
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.