Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7031705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:50:18+00:00 2026-05-28T00:50:18+00:00

$returnurl = http://clietsite.com:9000/service; $curlPost = rtyinstance=<parent><child>value</child></parent>; $ch1 = curl_init(); if (!$ch1) die(Couldn’t initialize a

  • 0
    $returnurl = "http://clietsite.com:9000/service";
    $curlPost = "rtyinstance=<parent><child>value</child></parent>";
    $ch1 = curl_init();
    if (!$ch1) die("Couldn't initialize a cURL handle");
    $headerinfo = apache_request_headers();
    curl_setopt($ch1, CURLOPT_URL, $returnurl);
    curl_setopt($ch1, CURLOPT_HEADER, 0);
    curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch1, CURLOPT_POST, true);
    curl_setopt($ch1, CURLOPT_POSTFIELDS, $curlPost);
    curl_setopt($ch1, CURLOPT_FRESH_CONNECT, 1);
    curl_setopt($ch1, CURLOPT_USERAGENT, $headerinfo['User-Agent']);
    curl_setopt($ch1, CURLOPT_TIMEOUT,1*60);
    $result = curl_exec($ch1);
    var_dump($result); 
    echo $responseCode = curl_getinfo($ch1, CURLINFO_HTTP_CODE);
    curl_close($ch1);

The above code returns responseCode 200, var dump prints string(0) “”.

when i run in browser (I’m using PHP Version 5.2.17)
like

http://clietsite.com:9000/service?instance=<parent><child>value</child></parent>

Which successfully returns an xml. don’t know what could be the issue. Please help me solve this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:50:19+00:00Added an answer on May 28, 2026 at 12:50 am

    Via cURL you are using POST, while in the browser you issue a GET.

    That might be the issue.

    To ‘convert’ to GET, use this code:

    $encoded_params = urlencode('<parent><child>value</child></parent>');
    $returnurl = "http://clietsite.com:9000/service?rtyinstance=" . $encoded_params;
    $ch1 = curl_init();
    if (!$ch1) die("Couldn't initialize a cURL handle");
    $headerinfo = apache_request_headers();
    curl_setopt($ch1, CURLOPT_URL, $returnurl);
    curl_setopt($ch1, CURLOPT_HEADER, 0);
    curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch1, CURLOPT_FRESH_CONNECT, 1);
    curl_setopt($ch1, CURLOPT_USERAGENT, $headerinfo['User-Agent']);
    curl_setopt($ch1, CURLOPT_TIMEOUT,1*60);
    $result = curl_exec($ch1);
    var_dump($result); 
    echo $responseCode = curl_getinfo($ch1, CURLINFO_HTTP_CODE);
    curl_close($ch1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to login to the Forums part of community-server (e.g. http://forums.timesnapper.com/login.aspx?ReturnUrl=/forums/default.aspx ) and
Consider: http://example.com/page.html?returnurl=%2Fadmin For js within page.html , how can it retrieve GET parameters? For
Site Details which uses the single sign on, 1. http:\\webgate.abcltd.com 2. http:\\sales.abcltd.com 3. http:\\emp.abcltd.com
I have this url in my login page: http://localhost:5550/login?ReturnUrl=/forum/456 I have this controller: [HttpPost]
This was my original code: @Url.Action(LoginYoutube, Account, new { returnUrl = Request.QueryString[ReturnUrl] }, http)
I have a domain http://abc.com and a subdomain http://sub.abc.com . I'm implementing single sign-on
I got a rewritten url that looks like this: http://www.mysite.com/users/login/ it's rewritten from http://www.mysite.com?module=users&class=login
I am using the PHP OpenID library from http://openidenabled.com on my site. However, I
Hello I managed to use the class ClassWSThumb (you can find it here http://www.codeproject.com/KB/aspnet/Website_URL_Screenshot.aspx
With my current function: http://piza.com/something returns pizza.com How do I change it so it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.