How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask ATLPROG Your Own Question
ATLPROG
ATLPROG, Computer Software Engineer
Category: Programming
Satisfied Customers: 7677
Experience:  MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
44910485
Type Your Programming Question Here...
ATLPROG is online now
A new question is answered every 9 seconds

I have an incoming http post that has multiple elements in

Customer Question

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.
Submitted: 2 years ago.
Category: Programming
Expert:  The-PC-Guy replied 2 years ago.
Thanks for using JustAnswer. My name is***** will do whatever I can to answer your question
HI, I can help you, but will need an example of your code
Customer: replied 2 years ago.
Hi, thanks. 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] =>***@******.***
[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=Caro+Alex&callernum=%2B16025544779&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] =>(###) ###-####)
Customer: replied 2 years ago.
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];
}
}
Customer: replied 2 years ago.
Ok, it's been 5 days. They should call this 'JustWait Until Next Week'
Customer: replied 2 years ago.
Now going on 1 week with NOTHING.