Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
Retrieving URL formed by CURL POST

I want to retrieve the final URL formed using a CURL request, but none of them work what I want to retrieve.

for example - I directly paste an API call in the browser address bar, it works, but when using CURL request I get some errors.

To find that I want to retrieve the final request URL formed by CURL or all the request parameters included in CURL Request.

The various methods I have tried is like:

$ch = curl_init();
$f = fopen('request.txt', 'w');
curl_setopt_array($ch, array(
    CURLOPT_URL            => $url, 
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_FOLLOWLOCATION => 1,
    CURLOPT_VERBOSE        => 1,
    CURLOPT_STDERR         => $f,
));
$response = curl_exec($ch);
fclose($f);
curl_close($ch);

Alternatively -

curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLINFO_HEADER_OUT, true);

$data = curl_exec($ch);
var_dump($data);
var_dump(curl_getinfo($ch));

Thanks.

Update: My request should form url like this:

https://api-3t.sandbox.paypal.com/nvp/?METHOD=SetExpressCheckout&VERSION=86&PWD=9mypassword&USER=my_user_name&SIGNATURE=my_api_signature&L_BILLINGTYPE0=RecurringPayments&L_BILLINGAGREEMENTDESCRIPTION0=FitnessMembership&cancelUrl=http://localhost/recurring-payment/index.php&returnUrl=http://localhost/recurring-payment/review.php

Now I want to get all the info in the above URL being submitted to Paypal API.

So I can retrieve this info being sent through CURL.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!