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 6359591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:32:19+00:00 2026-05-24T23:32:19+00:00

$dm_post = ‘DATA=’ . urlencode(‘<?xml version=1.0 encoding=ISO-8859-1?><REPORTE><NROCTA>1098670</NROCTA><DETALLE><CONSULTA><CLAVE>123456</CLAVE><TIPO>1</TIPO><OPERACIONES><ID>123456789</ID></OPERACIONES></CONSULTA></DETALLE></REPORTE>’); $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, $dm_url); curl_setopt($curl_handle,

  • 0
$dm_post = 'DATA=' . urlencode('<?xml version="1.0" encoding="ISO-8859-1"?><REPORTE><NROCTA>1098670</NROCTA><DETALLE><CONSULTA><CLAVE>123456</CLAVE><TIPO>1</TIPO><OPERACIONES><ID>123456789</ID></OPERACIONES></CONSULTA></DETALLE></REPORTE>');       

$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_URL, $dm_url);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $dm_post);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);

$info = simplexml_load_string($buffer, 'SimpleXMLElement', LIBXML_NOCDATA);

print_r($info);

Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, ‘<‘ not found in /var/www/domain.com/public_html/curl_test.php on line 15
Warning: simplexml_load_string(): 1 in /var/www/domain.com/public_html/curl_test.php on line 15
Warning: simplexml_load_string(): ^ in /var/www/domain.com/public_html/curl_test.php on line 15

any ideas? i dunno why i’m getting errors

  • 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-24T23:32:20+00:00Added an answer on May 24, 2026 at 11:32 pm

    Looks like you need to set the cURL option CURLOPT_RETURNTRANSFER to true.

    curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);

    http://php.net/curl_setopt

    Default behavior is for curl_exec() to output data directly. By turning on that option, it returns the data as a string instead, which appears to be what you’re expecting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If you followed a DM course, which textbook was used? I know about Data
I am noob in CI and I can't insert a data in database, here
(this is my fist post) I have written a PHP-script to enter a data-set
Whenever I try to post data values in PHP I get the following error:
I have another problem, I have a database with UserID's with data. I want
In localhost (using Wamp on windows). I'm trying to use this: <? $xml =
I want to have my site having form validation and xml generation by using
I have created this php script, to create an xml-file from my database: <?php
I am using ExtJS version 3.0.0 and I really don't know why every time
I have a page that takes data entered in a previous page and inputs

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.