Jump to content

milfone

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

milfone's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think will be hard to implement both function and I'm not a PHP guru, If somebody can help me I'll be glad to pay the time spent to implement the code. So now it is impossible to me learn how to parse an XML, Curl and other method. I have to start from the beginning with PHP book, and right now I haven't enough time.
  2. The first time is just an example. So now I have to use curl or only SimpleXMLElement? Can you send me an example code to able to retrieve XML tag? I'm pretty much desperate I don't know what I do.
  3. This is response of the form and It seems a correct XML: <?xml version="1.0" encoding="ISO-8859-1" ?> - <response> <stato>OK</stato> <messaggio>Inserimento utente effettuato correttamente.</messaggio> <id_cliente>131852990468021</id_cliente> </response> I'm right?
  4. How can I check if the XML is valid if I've got only the external URL to PHP file that produce XML? If I use Curl what I have to put on variable $string_from_curl? How can I use Curl in combination with SimpleXMLElement?
  5. I can't understand why, id_cliente/id_costumer return a valid id if the form was filled correctly http://lnx.studioarletti.it/moduli/pageA.php You say that beacasue id_cliente hasn't close tag? Or why? Thanks
  6. This is the scenario: the form pageA.php sent data on this page http://www.externalsite.com/crea_utente.php' and if this fields are correct <form action="<URL>" method="POST"> <input type="hidden" name="ds_nome" value=""/> <input type="hidden" name="ds_cognome" value=""/> <input type="hidden" name="ds_rag_soc" value=""/> <input type="hidden" name="ds_email" value=" "/> <input type="hidden" name="ds_codfisc" value=""/> <input type="hidden" name="_utente_username" value="" /> <input type="hidden" name="_utente_password" value="" /> <input type="submit" value="Invia" name="Invia"/> </form> response with XML output: <response> <status>OK</status> <message>registration success</ message > <id_costumer/>1132132123121 </response> How I can retrieve id_costumer of XML output and send to me by email? I've tryed with SimpleXML like suggested in this topic, but in the list of Functions there isn't nothing function to send form data through a php page (crea_utente.php) that create an XML. Please help me. Thanks
  7. If you try to fill this form: http://lnx.studioarletti.it/moduli/pageA.php there is a returned id_cliente number.
  8. It works but I can't send form data to Url define in the in SimpleXMLElement: <?php $source = "http://test.interateneo.com/admin/clienti/integra/crea_utente.php"; $sitemap = new SimpleXMLElement($source,0,true); echo $_REQUEST['ds_nome']; //return correct form field echo $sitemap->stato; //stato is KO, because ds_nome not correctly submitted to above url ?> How can I send my forms data to $source, then return correct tag in the same page like id_cliente or stato?
  9. Thanks ManiacDan, you're right I'll buy a PHP book. Thank you to explain me what I do, so the output code of vardump is: object(SimpleXMLElement)#1 (3) { ["stato"]=> string(2) "KO" ["messaggio"]=> string(18) "Parametri mancanti" ["id_cliente"]=> object(SimpleXMLElement)#2 (0) { } } What I do next? I really appreciate your help.
  10. I've seen the tutorial to create a SimpleXMLElement object from a URL, like requinix's suggestion: $sxe = new SimpleXMLElement('http://test.interateneo.com/admin/clienti/integra/crea_utente.php', NULL, TRUE); echo $sxe->asXML(); But the tag element is empty: KO Parametri mancanti and no returned id_cliente. I have to use something like XMLHttpRequest? Thanks
  11. Sorry but I'm new to PHP and XML, maybe I don't understand what I have to do, I'm trying to copy and past your code to my php page but I've got an error: Parse error: parse error in C:\wamp\www\moduli\xml.php on line 12 in line 12 there is this code: ["stato"]=> Can you explain what I do with an example code to retrieve the id_cliente (like $_POST in php)? Thanks
  12. There is no way? This is the exact url of the php page http://test.interateneo.com/admin/clienti/integra/crea_utente.php and produce this xml (like wrote in first post) <response> <status></status> <message></ message > <id_costumer/> </response> There is a solution? Thanks
  13. My bad, this is the error: Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML So, How can I parse a php page with XML file output?
  14. If there is other method to retrieve the XML tag in a php page, I think will be ok.
  15. This is the real example, If I post the form field directly to Php that produce XML page like above it works: PAGE A on my server: http://lnx.studioarletti.it/moduli/pageA.php(pageB.php is not on my server, and produce the correct XML tag). But I need to retrieve the the id_cliente/id_costumer and send it to costumer by email, and I can't to do it cause I can't include the external XML file to my php page. This is the other example and it's seems doesn't work on my server probably because there is a problem about php.ini and include direttive, but on my localhost it works and the string seems to be empty: http://lnx.studioarletti.it/moduli/pageA2.php and the code of my include file is: <?php include 'http://notmysite.com/crea_utente.php'; $response = new SimpleXMLElement($xmlstr); echo $response->id_cliente; ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.