Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

106
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda