[PHP] XML with PHP
Hi I am trying to read XML files (invoices) from a directory and display them to the visitor. Each XML file contains several invoices. The visitor then clicks on the XML file (invoices). My PHP snippet should open the xml file and locate the appropriate invoice and display the content. I have managed to list the directory contents using the following PHP snippet. The function call below DisplayBill($MemberId, $FileName, $StyleSheet) should take the memberid (login), the xml file name which has been clicked and the stylesheet to be used. I now have the following doubts for which I need clarifications Architecturally is it necessary the DisplayBill should be a seperate php file or can it exist as a function in the same file as the code below? Should the Invoices be displayed as a web form for me to capture the user click to retrieve the appropriate file and invoice so that I can display it to the user. I intend to parse the XML file using XPath (at this stage I am not sure if php supports Xpath and XQuery!) Any help would be appreciated Best regards Sridhar - ?php $BillLocation = /home/cmi/Integration/xml_files; $StyleSheet = Bill.xsl; $DirHandle = opendir($BillLocation); echo table border=\1\; echo tr; While (($FileName = readdir($DirHandle)) !== false) { if ($FileName != . $FileName != ..) { if (strpos($FileName, xml) !== false) { $BillYear = substr($FileName, 0, 4); $BillMonth = substr($FileName, 5, 2); switch ($BillMonth) { case 01: $BillMonth = January; break; case 02: $BillMonth = February; break; case 03: $BillMonth = March; break; case 04: $BillMonth = April; break; case 05: $BillMonth = May; break; case 06: $BillMonth = June; break; case 07: $BillMonth = July; break; case 08: $BillMonth = August; break; case 09: $BillMonth = September; break; case 10: $BillMonth = October; break; case 11: $BillMonth = November; break; case 12: $BillMonth = December; break; } echo td . a href='$FileName'$BillMonth . . $BillYear/a . /td . \n; echo /tr; } } } echo /table; closedir($DirHandle); $result = DisplayBill($MemberId, $FileName, $StyleSheet); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML with PHP
On Thu, Aug 26, 2010 at 2:54 AM, u...@domain.invalid wrote: Hi I am trying to read XML files (invoices) from a directory and display them to the visitor. Each XML file contains several invoices. The visitor then clicks on the XML file (invoices). My PHP snippet should open the xml file and locate the appropriate invoice and display the content. a) first, your email address isn't correct b) second, it looks like you intend on applying a stylesheet to get your results. if you don't require XSL, you could look at just using PHP's simplexml and/or XML DOM functions. it looks like you might just be using the XSL to transform the XML anwyay; so from what it looks like you -do not- need XSL in the mix. c) you can put the PHP in any file you want d) i believe xpath should work without any problems. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML with PHP
On Thu, Aug 26, 2010 at 3:10 AM, Sridhar Pandurangiah sridharpa...@gmail.com wrote: Mike Thanks a ton for the quick response. I have updated the mail id on my email client (using Mozilla TB) and I did repost but your reply was quicker! Will try this out and post the results on this thread. Just waiting for someone to throw light on how to capture the filename that the user clicked. Should I display the directory listing as a form? honestly, that's a little bit too i'm writing code and solving all your problems for you for me... it's hard to concentrate, i have to actually do the code, not read about it and try to figure it out from a description :) feel free to pastebin it, if i don't help you quick maybe someone else will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML with PHP
Hi I am trying to read XML files (invoices) from a directory and display them to the visitor. Each XML file contains several invoices. The visitor then clicks on the XML file (invoices). My PHP snippet should open the xml file and locate the appropriate invoice and display the content. I have managed to list the directory contents using the following PHP snippet. The function call below DisplayBill($MemberId, $FileName, $StyleSheet) should take the memberid (login), the xml file name which has been clicked and the stylesheet to be used. I now have the following doubts for which I need clarifications Architecturally is it necessary the DisplayBill should be a seperate php file or can it exist as a function in the same file as the code below? Should the Invoices be displayed as a web form for me to capture the user click to retrieve the appropriate file and invoice so that I can display it to the user. I intend to parse the XML file using XPath (at this stage I am not sure if php supports Xpath and XQuery!) Any help would be appreciated Best regards Sridhar - ?php $BillLocation = /home/cmi/Integration/xml_files; $StyleSheet = Bill.xsl; $DirHandle = opendir($BillLocation); echo table border=\1\; echo tr; While (($FileName = readdir($DirHandle)) !== false) { if ($FileName != . $FileName != ..) { if (strpos($FileName, xml) !== false) { $BillYear = substr($FileName, 0, 4); $BillMonth = substr($FileName, 5, 2); switch ($BillMonth) { case 01: $BillMonth = January; break; case 02: $BillMonth = February; break; case 03: $BillMonth = March; break; case 04: $BillMonth = April; break; case 05: $BillMonth = May; break; case 06: $BillMonth = June; break; case 07: $BillMonth = July; break; case 08: $BillMonth = August; break; case 09: $BillMonth = September; break; case 10: $BillMonth = October; break; case 11: $BillMonth = November; break; case 12: $BillMonth = December; break; } echo td . a href='$FileName'$BillMonth . . $BillYear/a . /td . \n; echo /tr; } } } echo /table; closedir($DirHandle); $result = DisplayBill($MemberId, $FileName, $StyleSheet); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML with PHP
Hi I guess my post was misunderstood. I was just trying to figure out if there is a better way other than displaying a form. That's the reason I posted my php snippet in my first post. Thanks for the help. Best regards Sridhar Original Message Subject: Re: [PHP] XML with PHP From: mike...@gmail.com (Michael Shadle) To: Date: Thu Aug 26 2010 15:43:33 GMT+0530 (IST) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML with PHP
Mike Thanks a ton for the quick response. I have updated the mail id on my email client (using Mozilla TB) and I did repost but your reply was quicker! Will try this out and post the results on this thread. Just waiting for someone to throw light on how to capture the filename that the user clicked. Should I display the directory listing as a form? Best regards Sridhar Original Message Subject: Re: [PHP] XML with PHP From: mike...@gmail.com (Michael Shadle) To: Date: Thu Aug 26 2010 15:32:13 GMT+0530 (IST) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
On Tue, July 25, 2006 8:33 am, David Tulloh wrote: Larry Garfield wrote: Disable short tags. The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) Can you find anywhere where this was announced? I don't recall seeing any decision on it. A quick search found several mentions of the devs deciding to keep short tags when going from php 4 to php 5. The php 6 todo list shows that % will be removed but ? will stay. The Meeting Notes from the Devs getting together in Paris sez: http://www.php.net/~derick/meeting-notes.html#remove-support-for-and-script-language-php-and-add-php-var This may be out-dated... Personally, I would not miss ? much, but ?= is quite convenient, if it would just work ALWAYS instead of by configuration option. Oh well. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: a) Use PHP to print out the XML declaration as a string: ?php print '?xml version=1.0 encoding=utf-8?'; ? b) Disable short tags so that the PHP parser ignores ? and only recognizes ?php. The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) Can you find anywhere where this was announced? I don't recall seeing any decision on it. A quick search found several mentions of the devs deciding to keep short tags when going from php 4 to php 5. The php 6 todo list shows that % will be removed but ? will stay. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
At 11:01 PM -0500 7/24/06, Larry Garfield wrote: Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: Bingo ! That works : ) Apparently the better minds are on this list. Thanks very much. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
On Tue, July 25, 2006 3:15 pm, Kevin Waterson said: This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin The last I heard, they were still slated for removal. The PHP core team does have a habit of changing their minds about such things on a regular basis, however, so who knows what their plan is this week. :-) --Larry Garfield -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] xml v php question
On Tue, July 25, 2006 3:15 pm, Kevin Waterson said: This one time, at band camp, Larry Garfield [EMAIL PROTECTED] wrote: The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) ummm, I think it was decided to stay in php6. I could be mildly/wildly mistaken Kevin The last I heard, they were still slated for removal. The PHP core team does have a habit of changing their minds about such things on a regular basis, however, so who knows what their plan is this week. :-) What the PHP core team does or doesn't do has no bearing on the fact that short tags are bad voodoo. Just say no to short tags, and your life will be easier, your shirts whiter, and your teeth brighter! JM -- who has never used short tags, and never will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml v php question
Hi gang: Why does starting my php script with -- ?xml version=1.0 encoding=utf-8? -- stop it from running? I would like to use php in a page, but the page has to begin with a xml declaration to generate a quirksmode for IE6 and under while permitting IE7 to be left in standards mode. We've tried it in both Wordpress and Textpattern and both are php and neither are able to parse a document with an xml declaration above the header. Is this problem solvable? I've been told that better minds have already tried and failed to resolve this issue. So, what say you group? Thanks in advance for any replies, comments, explanations, or solutions. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml v php question
Disable short tags. If short tags are enabled, the PHP parser sees the ? and switches into PHP mode. It then starts parsing the xml and sees that it's not proper PHP, and freaks out. You can: a) Use PHP to print out the XML declaration as a string: ?php print '?xml version=1.0 encoding=utf-8?'; ? b) Disable short tags so that the PHP parser ignores ? and only recognizes ?php. The correct answer is (b). (PHP 6 won't even have short tags, so get used to not having them.) On Monday 24 July 2006 20:42, tedd wrote: Hi gang: Why does starting my php script with -- ?xml version=1.0 encoding=utf-8? -- stop it from running? I would like to use php in a page, but the page has to begin with a xml declaration to generate a quirksmode for IE6 and under while permitting IE7 to be left in standards mode. We've tried it in both Wordpress and Textpattern and both are php and neither are able to parse a document with an xml declaration above the header. Is this problem solvable? I've been told that better minds have already tried and failed to resolve this issue. So, what say you group? Thanks in advance for any replies, comments, explanations, or solutions. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML and PHP
hi all, i would like to know where i could find more info on xml and working xml with php. thanks.
RE: [PHP] XML and PHP
[snip] i would like to know where i could find more info on xml and working xml with php. [/snip] Start with the manual http://www.php.net/xml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML and PHP
use a search engine. if you can't find what you need, then ask. if you already did this, then state that you already looked and you found xyz, but xyz isn't telling you what you need to know, which is specifically blah. best, charles On Jul 6, 2005, at 2:59 PM, Cima wrote: hi all, i would like to know where i could find more info on xml and working xml with php. thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML and PHP
Hi! I've been looking at the XML-parserfunctions in the manual, and they seems nice enough. But I'm currently in a project where there is need to read from, write to and edit in XML-files, in some smart way. Our ISP is supporting the following: xml XML Support active XML Namespace Support active EXPAT Version 1.95.6 I suppose the answer to my questions lies in the expath-part, but where do I start, where can I read more about the above expat and which is the best approach for me in this project? We're going to import som data from Navision, XML-formatted, to postgresql, and meanwhile documents are edited they are, until finished, going to be saved as xml-documents on the server. Sincerely Victor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML to PHP help
On Sun, 31 Aug 2003 11:20:23 -0500, you wrote: No, what I'm looking for is a script that will download the backend.php file like you get from slashdot.org, and turn it into a readable html file that can be insterted into another php file. Make sense? Not really. Forget about the file extension (php, html, etc). Doesn't matter once you're off the server. What is the /content/ of the file you're trying to recover? Sounds like you're screen-scraping HTML. Getting the file should be a one-liner, but depending on what you want to do, parsing it might be more complex. (slashdot's scripts are Perl writing out static HTML every five minutes, anyway. It doesn't have a backend.php) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML to PHP help
hi Ron, There's no way you can retrieve the php on a remote server (unless of course they have a major security flow :-) ) Ron Clark wrote: Hello all, Does anyone have a script, or know where to find a working script to pull backend.php files from a site, parse them into a html type file, and display them correctly? I have been working on one for my site for some time now, and I cannot sem to get it right. I want to see the structure of a working script and compare it to my own. Thanks, Ron Clark -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML to PHP help
No, what I'm looking for is a script that will download the backend.php file like you get from slashdot.org, and turn it into a readable html file that can be insterted into another php file. Make sense? Thanks, RC -Original Message- From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] Sent: Sunday, August 31, 2003 11:20 AM To: Ron Clark; [EMAIL PROTECTED] Subject: Re: [PHP] XML to PHP help hi Ron, There's no way you can retrieve the php on a remote server (unless of course they have a major security flow :-) ) Ron Clark wrote: Hello all, Does anyone have a script, or know where to find a working script to pull backend.php files from a site, parse them into a html type file, and display them correctly? I have been working on one for my site for some time now, and I cannot sem to get it right. I want to see the structure of a working script and compare it to my own. Thanks, Ron Clark -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML to PHP help
Hello all, Does anyone have a script, or know where to find a working script to pull backend.php files from a site, parse them into a html type file, and display them correctly? I have been working on one for my site for some time now, and I cannot sem to get it right. I want to see the structure of a working script and compare it to my own. Thanks, Ron Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML to PHP help
On Sun, 31 Aug 2003 11:20:23 -0500, you wrote: No, what I'm looking for is a script that will download the backend.php file like you get from slashdot.org, and turn it into a readable html file that can be insterted into another php file. Make sense? Oh, hey, wait a sec - XML, backend... are you trying to parse an RSS feed? Try this http://magpierss.sourceforge.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml and php
Hello I'm a beginner in php. Sorry to disturb you but I have two problems and I hope you can help me. I use php 4.3.2(InetPub\Php is my php directory) under windows 2000 server with IIS 5.0. I want to manipulate xml file with Php (add some element, modify some element, delete some element and consult some element) but when I try domxml_open_file I obtain system error : Call to undefined function: domxml_open_file() I heard about use --with-dom but I don't see how and about php/win32 directory which I don't see. Can you help me ? Thanks Cordially Vauclaire Stéphane http://www.c-comnet.com
RE: [PHP] xml and php
[snip] I'm a beginner in php. I want to manipulate xml file with Php (add some element, modify some element, delete some element and consult some element) but when I try domxml_open_file I obtain system error : Call to undefined function: domxml_open_file() I heard about use --with-dom but I don't see how and about php/win32 directory which I don't see. [/snip] Start here http://us3.php.net/xml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml and php
Thanks for you answer in php_info I only have this XML Support active XML Namespace Support active EXPAT Version 1.95.2 and nothing about dom xml so I can parse and read xml file but I can't add or modify nothing in my xml file and even not create xml file ! I tried to use expat but I don't see how I should make can you tell me more knowing I'm under windows 2000 server with iis 5.0 and php 4.3.2 ? Thanks Cordially Stéphane Vauclaire - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Steff [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, July 31, 2003 3:03 PM Subject: RE: [PHP] xml and php [snip] I'm a beginner in php. I want to manipulate xml file with Php (add some element, modify some element, delete some element and consult some element) but when I try domxml_open_file I obtain system error : Call to undefined function: domxml_open_file() I heard about use --with-dom but I don't see how and about php/win32 directory which I don't see. [/snip] Start here http://us3.php.net/xml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] xml and php
[snip] so I can parse and read xml file but I can't add or modify nothing in my xml file and even not create xml file ! [/snip] Uh, XML files are text files which you can modify with any of the text handling functions in PHP. What exactly are you trying to accomplish? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] xml and php
[snip] ?xml version=1.0? library book id 1 /id title lg=FR Title 1 /title Desc lg=FR Description 1 /Desc KeyWords lg=FR keyword 1/key keyword 2/key keyword 3/key /KeyWords title lg=EN Title 1 /title Desc lg=EN Description 1 /Desc KeyWords lg=EN keyword 1/key keyword 2/key /KeyWords author Author 1 /author ISBN ISBN 1 /ISBN /book /library I want to be able to add, modify and delete book of library. Can you help me ? [/snip] Yes I can help. fopen() library.xml (see http://www.php.net/fopen ) for writing. Write all of the XML tags from book to /book and appropriate info to library.xml and then close it. Use the XML functions (http://www.php.net/xml ) to work with the xml file for parsing. I think you may be overcomplicating the issue. The XML file is just a text file. The XML parser allows you to work with the file in a meaningful way. HTH! P.S. When responding please respond to the list as a whole. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml and php
Make sure that you have all the dlls that are needed for php+dom. these dlls need to be in your windows path as well. Uncomment the dll in your php.ini file and restart the webserver. View a php page with phpinfo() as the only function in that page: ?php phpinfo(); ? See if you have dom in there. If not then follow the above steps again. If you dont have the dll then you will need to download the zip file from php.net. Now that you have dom you can load in xml files as dom objects and manipulate the object with the dom functions. -- BigDog On Thu, 2003-07-31 at 06:54, Steff wrote: Hello I'm a beginner in php. Sorry to disturb you but I have two problems and I hope you can help me. I use php 4.3.2(InetPub\Php is my php directory) under windows 2000 server with IIS 5.0. I want to manipulate xml file with Php (add some element, modify some element, delete some element and consult some element) but when I try domxml_open_file I obtain system error : Call to undefined function: domxml_open_file() I heard about use --with-dom but I don't see how and about php/win32 directory which I don't see. Can you help me ? Thanks Cordially Vauclaire Stéphane http://www.c-comnet.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML into PHP
Wednesday, November 13, 2002, , wrote: How would i call a page in PHP that is XML? eg; if i had a file that was like below. http://www.philipnz.com/news/rss.xml and i wanted to include it onto a page. Look into PHP manual: XML parser functions -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML into PHP
How would i call a page in PHP that is XML? eg; if i had a file that was like below. http://www.philipnz.com/news/rss.xml and i wanted to include it onto a page. HELP (looking through the docs now) --- Philip J. Newman. Head Developer. PhilipNZ.com New Zealand Ltd. http://www.philipnz.com/ [EMAIL PROTECTED] Mob: +64 (25) 6144012. Tele: +64 (9) 5769491. Family Site: Philip J. Newman Internet Developer http://newman.net.nz/ [EMAIL PROTECTED] * Friends are like Stars, You can't always see them, But you know they are there. * ICQ#: 20482482 MSN ID: [EMAIL PROTECTED] Yahoo: [EMAIL PROTECTED] AIM: newmanpjkiwi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML into PHP
hi, do you want to show the whole XML content (including tags and other things) or you want to extract data (tag text and attribute vaules) from it? khalid _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML into PHP
hi, try this parser http://creaturesx.ma.cx/kxparse/ (not stable) _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML in PHP on Apache (RH 7.3)
Hello its urgent problem! I need apache server with php supporting XML, i have read the manual and some posts how-to compile it ( http://www.php.net/manual/en/ref.xml.php ) i have download sources of expat and doing step-by-step instructions given in one of the posts ( *pfreet at trusolutions dot com* /16-Aug-1999 05:13 ) i have made expat and configure php with xml and make it , and also Apache. well it still doesn't work. Could somebody sent me precise, step by step instruction how to configure it and make working? i'm not sure: 1.where i should place unziped expat files 2.how make file (parameters) please help! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xml and php
iwill rephrase my question, where can i find good xml-php links? how would you extract all information about the Guinevere server in this xmlpage, http://www.camelotherald.com/xml/servers.xml its aprox in the middle of the list, and i want all information there so i could display it on a page. regards patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML vs. PHP manual???
I read the useful document about XML in PHP on http://www.analysisandsolutions.com/code/phpxml.html. I still haven't made much progress on XML. I'm still confuse about XML. I had to write XML stuffs on the client-side with the build-in XML request and it doesn't make sense that the client brower should be communicating to credit bureau network without going to my company's PHP webserver to that credit bureau. So, it meant I have to use the post request that would send the data to my company's PHP webserver and somehow convert it into xml and send it to that credit bureau by cURL. Is there a way to do that?? Thanks, FletchSOD P.S. Is there a good XML / PHP manual for that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML vs. PHP manual???
On Tue, Jul 23, 2002 at 12:33:19PM -0400, Scott Fletcher wrote: I read the useful document about XML in PHP on http://www.analysisandsolutions.com/code/phpxml.html. Thanks. But, you mean: http://www.analysisandsolutions.com/code/phpxml.htm I had to write XML stuffs on the client-side with the build-in XML request and it doesn't make sense that the client brower should be communicating to credit bureau network without going to my company's PHP webserver to that credit bureau. Programs do what you tell them to do. If you write something on the client and then tell it to get data from (or send data to) the credit bureau, why would you expect it to communicate with your server? If you want it to send/receive from your server, then you need to tell the program to do that. Also, PHP is a server side language, so, if you wrote something client side, what language did you write it in and you might be better off asking on a list for that language. So, it meant I have to use the post request that would send the data to my company's PHP webserver and somehow convert it into xml and send it to that credit bureau by cURL. Is there a way to do that?? Sure. Make an HTML form on your server where users type in the input. You need to then design a script that handles the data the users submit. I don't know how you want the data formatted nor how data gets submitted to your credit bureau, so I can't state anything specific on the remaining steps. Anyway, when you're writing your HTML form in the first step, the action attribute in the form tag should lead to that second script you made. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML vs. PHP manual???
Ha ha, I'm so used to html instead of htm. :-) It have been my thought that I write a script as a post method to send data to the server then have hte PHP webserver do the dirty work. I haven't figure out how to get PHP to put in the xml stuffs into the data and send it to the credit bureau. The documentation said the data need to be in XML format when sending and receiving the data. Before, I use the serial stream of data with the format setting according to the guideline in the manual I got from the credit bureau. Well, we don't want the customer to access that credit bureau site since they aren't a programmer, just somebody who want to see the inquiries. Lots of them don't know how to use SSLs. It doesn't seem to be a good idea to create a software and give it to the customers. Also, throught the server can I be able to tell if the data is a hit or not a hit, whether the add-on stuffs being used or not, etc. The person name in the inquiry, all together, would I be able to put into the database for billing purpose. FletchSOD Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tue, Jul 23, 2002 at 12:33:19PM -0400, Scott Fletcher wrote: I read the useful document about XML in PHP on http://www.analysisandsolutions.com/code/phpxml.html. Thanks. But, you mean: http://www.analysisandsolutions.com/code/phpxml.htm I had to write XML stuffs on the client-side with the build-in XML request and it doesn't make sense that the client brower should be communicating to credit bureau network without going to my company's PHP webserver to that credit bureau. Programs do what you tell them to do. If you write something on the client and then tell it to get data from (or send data to) the credit bureau, why would you expect it to communicate with your server? If you want it to send/receive from your server, then you need to tell the program to do that. Also, PHP is a server side language, so, if you wrote something client side, what language did you write it in and you might be better off asking on a list for that language. So, it meant I have to use the post request that would send the data to my company's PHP webserver and somehow convert it into xml and send it to that credit bureau by cURL. Is there a way to do that?? Sure. Make an HTML form on your server where users type in the input. You need to then design a script that handles the data the users submit. I don't know how you want the data formatted nor how data gets submitted to your credit bureau, so I can't state anything specific on the remaining steps. Anyway, when you're writing your HTML form in the first step, the action attribute in the form tag should lead to that second script you made. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML with PHP cURL.
Hi! I find it to be mind-boggling to try to make xml work with php and curl. What do anyone here think of it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML with PHP cURL.
[snip] Hi! I find it to be mind-boggling to try to make xml work with php and curl. What do anyone here think of it? [/snip] More details about the problem would be nice. How exactly do you want this to work? I have had no problems with cURL and PHP. Jay What was the best thing before sliced bread? * * Want to meet other PHP developers * * in your area? Check out: * * http://php.meetup.com/* * No developer is an island ... * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML with PHP cURL.
On Thu, Jul 18, 2002 at 11:03:10AM -0400, Scott Fletcher wrote: Hi! I find it to be mind-boggling to try to make xml work with php and curl. What do anyone here think of it? Well, I can offer help on the XML: http://www.analysisandsolutions.com/code/phpxml.htm --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML with PHP cURL.
Cool! I'm just getting started on XML. I read the documentation about XML and it doesn't look too hard. Unfortunately, it is written for the client side script. So, I barely am starting writing the test script for the server side and have it work with php and curl. At least, I know how to use curl and php without a problem. Just trying to figure out to slide the xml data through curl to somewhere and vice versa. It involve 2 seperate URL address. The 1st for authentication and the 2nd for transmitting datas. Sigh! Alright! I'll read the post, http://www.analysisandsolutions.com/code/phpxml.htm and see what I can learn from. Thanks, FletchSOD Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Thu, Jul 18, 2002 at 11:03:10AM -0400, Scott Fletcher wrote: Hi! I find it to be mind-boggling to try to make xml work with php and curl. What do anyone here think of it? Well, I can offer help on the XML: http://www.analysisandsolutions.com/code/phpxml.htm --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML with PHP cURL.
More detail? I have successfully make the data transmission work through php and curl without xml. I just barely gotten started on xml. I read the documentation about how it work, but it is only for the client side. I'm going to have to read some documentation and figure out how to use xml in php then figure out how to use curl for xml transmission. It is not just setting up curl is the issue here since xml and transmit through and back without the problem as I read on the cURL website. I have two URLs to deal with. The 1st for authentication and the 2nd, a completely different URL address for transmitting data. The odd thing is I don't need to have the encryption packages since the letter said all I need to do is to issue the key to that website and it will provide the encryption to me. Must be related to the authentication stuffs. Thanks, FletchSOD Going to have to find Jay Blanchard [EMAIL PROTECTED] wrote in message 001401c22e6c$4843be20$8102a8c0@niigziuo4ohhdt">news:001401c22e6c$4843be20$8102a8c0@niigziuo4ohhdt... [snip] Hi! I find it to be mind-boggling to try to make xml work with php and curl. What do anyone here think of it? [/snip] More details about the problem would be nice. How exactly do you want this to work? I have had no problems with cURL and PHP. Jay What was the best thing before sliced bread? * * Want to meet other PHP developers * * in your area? Check out: * * http://php.meetup.com/* * No developer is an island ... * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML with PHP?
Hey! Which PHP option should I use for compiling with the XML support. I'm using the standard XML support on the web and I found there are 4 or 5 different PHP option for XML. Which should I use? The example of the XML is .. -- clip -- ?xml version=1.0 encoding=UTF-8? NetConnectRequest xmlns=http://www.; ... BDHosts11/DBHosts Products CreditProfile blah, blah, etc. /CreditProfile /Products -- clip -- Thanks, FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML with PHP?
--xml -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 12, 2002 6:57 AM To: [EMAIL PROTECTED] Subject: [PHP] XML with PHP? Hey! Which PHP option should I use for compiling with the XML support. I'm using the standard XML support on the web and I found there are 4 or 5 different PHP option for XML. Which should I use? The example of the XML is .. -- clip -- ?xml version=1.0 encoding=UTF-8? NetConnectRequest xmlns=http://www.; ... BDHosts11/DBHosts Products CreditProfile blah, blah, etc. /CreditProfile /Products -- clip -- Thanks, FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML and PHP - dynamic hell
Did you try adding: header(Content-Type: text/xml); To the top? -Original Message- From: Chris [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 01, 2001 12:34 AM To: [EMAIL PROTECTED] Subject: [PHP] XML and PHP - dynamic hell I'm having one page output XML for other sites to parse. Unfortunately if I give an RSS parser the site (the php file) it errors out. But if I put the output in a XML file, and give that to the RSS parser everything works perfectly. Does anyone know why it can't read it straight from the php file? PHP Builder has it working, I have no idea why mine doesn't. Thanks Source: ? require division/settings.inc; require RootPath . admin/Admin.php; //these just define mysql logins and such echo . ?xml version=\1.0\? . \n; echo !DOCTYPE rss PUBLIC \-//Netscape Communications//DTD RSS 0.91//EN\ \http://my.netscape.com/publish/formats/rss-0.91.dtd\;\n; echo rss version=\0.91\\n; echo channel\n; $query = mysql_query(Select * from . PREFIX . news order by Date Desc Limit 40); while($results = mysql_fetch_array($query)) { echo item\n; echo title . stripslashes($results[Subject]) . /title\n; echo linkhttp://dod.stronger.org//link\n; echo author$results[Name]/author\n; echo description . substr(htmlspecialchars(stripslashes($results[News])),0,150) . .../description\n; echo /item\n; } ? /channel /rss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] XML and PHP - dynamic hell
It didn't help :( - Original Message - From: Matthew Loff [EMAIL PROTECTED] To: 'Chris' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 01, 2001 10:03 AM Subject: RE: [PHP] XML and PHP - dynamic hell Did you try adding: header(Content-Type: text/xml); To the top? -Original Message- From: Chris [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 01, 2001 12:34 AM To: [EMAIL PROTECTED] Subject: [PHP] XML and PHP - dynamic hell I'm having one page output XML for other sites to parse. Unfortunately if I give an RSS parser the site (the php file) it errors out. But if I put the output in a XML file, and give that to the RSS parser everything works perfectly. Does anyone know why it can't read it straight from the php file? PHP Builder has it working, I have no idea why mine doesn't. Thanks Source: ? require division/settings.inc; require RootPath . admin/Admin.php; //these just define mysql logins and such echo . ?xml version=\1.0\? . \n; echo !DOCTYPE rss PUBLIC \-//Netscape Communications//DTD RSS 0.91//EN\ \http://my.netscape.com/publish/formats/rss-0.91.dtd\;\n; echo rss version=\0.91\\n; echo channel\n; $query = mysql_query(Select * from . PREFIX . news order by Date Desc Limit 40); while($results = mysql_fetch_array($query)) { echo item\n; echo title . stripslashes($results[Subject]) . /title\n; echo linkhttp://dod.stronger.org//link\n; echo author$results[Name]/author\n; echo description . substr(htmlspecialchars(stripslashes($results[News])),0,150) . .../description\n; echo /item\n; } ? /channel /rss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] xml and php question
Hey all I'm not so sure if this is the correct place to ask this question, but I'm hoping some of you will be able to give me some feedback. I am currently toying around with php and mysql developing a website for myself, the current one is partly php powered, but I am trying to move it over to a complete php and mysql system, I would also like to use XML. i have previously used Xml on another web project, and i really liked the way you could reformat you content, and it's ease of use. What i was wondering is, if any of you use XML to store your content, in what way do you go about it. At the moment i see 2 sepeerate ways of going about it. a)Mark up your documents in xml and store the xml documents in a database, your database can be pretty simple, witha couple of fields that represent some of the meta data in the xml file, e.g. Author, Date-created, then a large blob which is the doc. when you wish to view the document, you search on the criteria that is available, and then retrieve your xml doc. Some down sides to this could be the explosion in the size of the db, if you are storing a large amount of documents etc and also the redundancy in some of hte fields, e.g you have an author field, but this info is contained in the xml doc. It is good, because it is an essentialy simple application, in both php code to pull the data and in the database design. b)have the database act as a sort of XML holder, e.g. break the document down to it's base components, and store all the meta data in the database, when a doc is needed, the xml doc can be created on the fly, by pulling the data out of the appropriate fields. some problems with this can be the database design, it can become extremly complicated(i would imagine, i have not tried it yet), as you are effiectively modelling the DTD in the database. but at the same time, we are reducing redundancy, hopefully, so long as it is well normalised. the reason i am asking this is becaue of the amount i read about xml, how good it is extensible etc, there is not much out there inregards to the practical application of it, aside form the odd tutorial on how to construct a DTD or how to parse XMl with Java/PHP etc. once again, i'm not sure if this post is appropriate to this mailing list, perhaps i should send it to a MySql list or something, but if anyone has any ideas or thoughts on the topic i would really appreciate it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] xml with php
Please can you guide me, I want to use php to update the following xml with the values the user fills in. for example add value="" in the "input type text" line and add checked to the Radio button line. Is there any functions in php that can be used to step through a xml and just update the form object lines(e.g. Text, Radio, Check...) ?xml version="1.0" encoding="UTF-8"? ?xml-stylesheet type="text/xsl" href="app.xsl"? ?cocoon-process type="xslt"? Form Text LABEL="NAME" SIZE="24" NAME="Name"/ Radio LABEL="10" NAME="AGE" VALUE="10"/ Radio LABEL="20" NAME="AGE" VALUE="20"/ Check LABEL="stamps" NAME="hobby" VALUE="stamps"/ /Form Any guidance would be greatly appreciated, Thank, Steve __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]