[PHP] PHP XML
Hi Guys I am developing with PHP and XML. Now I experience some problem with the processing instructions of xml (?xml version=1.0 encoding=UTF-8?) which causes PHP to return a parsing error. This is logical because ? is also the short-tag processing instruction for PHP. Does anybody got an idea how to solve this problem without disabling the short-tags in the php.ini fiel ? Thx -- 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] PHP and JAVA
Hi all Does anyone got any experience with JAVA in PHP? I tried to rebuild php with java support. Everything worked well but when I try to initiate Java in PHP, I get cannot instantiate Virtual machine. I use kaffe and I believe I have configured PHP correctly. See http://www.haemelinck.be:8080/phpinfo.phtml Thx -- 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] PHP Oracle9i
Is it possible to use Oci-functions with Oracle 9i database ? -- 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] PHP with ORACLE 8i/9i
Question: I want to build php withd support for ORACLE 8i or 9i. Normally you use the option with-oci=path-to-oraclehome. So far so good. How can I achieve this when the oracle database is running on another server? Thx Haemelinck Steve Haemelinck.be - Developers Unite (Under construction ) http://www.haemelinck.com http://www.haemelinck.be:8080/ [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] IE - View Source
Some sites are able to disable the source view in ie. How do you do that? Haemelinck Steve Personal: Haemelinck.be - Developers Unite :) Junior WebDeveloper http://www.haemelinck.com/ [EMAIL PROTECTED] Work: MCT IT Consulting - Take consulting 2 the next level Junior IT Consultant http://www.mct.be/ [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] Gettting an XML file through a proxy
Hi All Anybody got an idea how I can get an XML file through a proxy. I tried fsockopen with a a GET request but this does not give me what I want :) Thx Haemelinck Steve Personal: Haemelinck.be - Developers Unite :) Junior WebDeveloper http://www.haemelinck.be:8080/ [EMAIL PROTECTED] Work: MCT IT Consulting - Take consulting 2 the next level Junior IT Consultant http://www.mct.be/ [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] Browser Caching
Hi all I use sessions the authenticate users, but I seem to have a problem. This is what happens: 1) A user logs in on PC one with his username and password. (So far so good) 2) Another user logs in with his details on the same computer -- He is logged in with his details but the page displayed is the one of the other user unless he refreshes the page. I thought this was because the page might be cached, but when I set the header(cache-control: no-cache) the meta tag http-equiv=Expires content=-1 it still produces the same effect. How can I solve this problem? Haemelinck Steve Personal: Haemelinck.be - Developers Unite :) Junior WebDeveloper http://www.haemelinck.be:8080/ [EMAIL PROTECTED] Work: MCT IT Consulting - Take consulting 2 the next level Junior IT Consultant http://www.mct.be/ [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] Caching Authentification
Hi all I use sessions the authenticate users, but I seem to have a problem. This is what happens: 1) A user logs in on PC one with his username and password. (So far so good) 2) Another user logs in with his details on the same computer -- He is logged in with his details but the page displayed is the one of the other user unless he refreshes the page. I thought this was because the page might be cached, but when I set the header(cache-control: no-cache) the meta tag http-equiv=Expires content=-1 it still produces the same effect. How can I solve this problem? Haemelinck Steve Personal: Haemelinck.be - Developers Unite :) Junior WebDeveloper http://www.haemelinck.be:8080/ [EMAIL PROTECTED] Work: MCT IT Consulting - Take consulting 2 the next level Junior IT Consultant http://www.mct.be/ [EMAIL PROTECTED] Haemelinck Steve Personal: Haemelinck.be - Developers Unite :) Junior WebDeveloper http://www.haemelinck.be:8080/ [EMAIL PROTECTED] Work: MCT IT Consulting - Take consulting 2 the next level Junior IT Consultant http://www.mct.be/ [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] Protecting JavaScripts from being Donwloaded
Hi all is it possible to protect your javascripts from being downloaded by visitors ? -- 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] $PHP_SELF
Anybody got an idea why $PHP_SELF isn't working with me? I think because I have set my register_globals to off, but how can I get the value of $PHP_SELF an another way ? -- 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] register_globals PHP_SELF
Does the PHP_SELF variable only work if you have your register_globals on? Is their an another for still using it ? Thx -- 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] PHPLIB and Auth
Hi Guys, I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong ?php class TIMEKEEPER_AUTH extends Auth{ /* Declare variables */ var $classname="TIMEKEEPER_AUTH"; var $magic="TIMEKEEPER_MAGIC"; var $lifetime=15; //Maximum 15 minutes idle time !!! var $database_class = "TIMEKEEPER_DB"; var $database_table = "auth_user"; function auth_loginform() { global $sess; include("loginform.ihtml"); } function auth_validatelogin() { global $username, $password; if(isset($username)) { $this-auth["uname"]=$username; } $uid = false; $this-db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this-database_table, addslashes($username), addslashes($password))); while($this-db-next_record()) { $uid = $this-db-f("user_id"); $this-auth["perm"] = $this-db-f("perms"); } return $uid; } } /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db-query("select count(*) as count from auth_user"); $db-Next_Record(); $count = $db-f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db-Next_Record(); $uid = $db-f("user_id"); //uid gives ... which is correct SO OK --- The must be something wrong with my loginform it does not submit the right values WHY ? -- 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] PHPLIB and Auth
Can it be that my Apache server is not well configured? I think you have to allow methods like GET and POST ? -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 19 maart 2001 10:26 To: PHP Mailing Listl (E-mail) Subject:[PHP] PHPLIB and Auth Hi Guys, I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong ?php class TIMEKEEPER_AUTH extends Auth{ /* Declare variables */ var $classname="TIMEKEEPER_AUTH"; var $magic="TIMEKEEPER_MAGIC"; var $lifetime=15; //Maximum 15 minutes idle time !!! var $database_class = "TIMEKEEPER_DB"; var $database_table = "auth_user"; function auth_loginform() { global $sess; include("loginform.ihtml"); } function auth_validatelogin() { global $username, $password; if(isset($username)) { $this-auth["uname"]=$username; } $uid = false; $this-db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this-database_table, addslashes($username), addslashes($password))); while($this-db-next_record()) { $uid = $this-db-f("user_id"); $this-auth["perm"] = $this-db-f("perms"); } return $uid; } } /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db-query("select count(*) as count from auth_user"); $db-Next_Record(); $count = $db-f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db-Next_Record(); $uid = $db-f("user_id"); //uid gives ... which is correct SO OK --- The must be something wrong with my loginform it does not submit the right values WHY ? -- 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]
FW: [PHP] PHPLIB and Auth
-Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 19 maart 2001 11:52 To: 'Steve Haemelinck' Subject:RE: [PHP] PHPLIB and Auth It has certainly got something to do with my config. I just tried a simple form with POST And it gave the following ERROR: Parse error: parse error, expecting 'T_STRING' or 'T_VARIABLE' or 'T_NUM_STRING' What does this mean? -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 19 maart 2001 10:26 To: PHP Mailing Listl (E-mail) Subject:[PHP] PHPLIB and Auth Hi Guys, I really have a stupid problem but I don't see it :). I wanted to implement authentification with PHPLIB but it seems I am not able to get it working. What happens: If I want to access a page which needs authentification I first get the loginform, so far so good, but when I enter a username and password and submit it, I always get the loginform with the message "Invalid username or password try again". First I thought it was because I had badly configured my database, but the example below shows my database wasn't causing the problem. I think the problem is my loginform, but I don't see how. Do I have to make a setting in my php.ini, what is wrong ?php class TIMEKEEPER_AUTH extends Auth{ /* Declare variables */ var $classname="TIMEKEEPER_AUTH"; var $magic="TIMEKEEPER_MAGIC"; var $lifetime; //Maximum 15 minutes idle time !!! var $database_class = "TIMEKEEPER_DB"; var $database_table = "auth_user"; function auth_loginform() { global $sess; include("loginform.ihtml"); } function auth_validatelogin() { global $username, $password; if(isset($username)) { $this-auth["uname"]=$username; } $uid = false; $this-db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $this-database_table, addslashes($username), addslashes($password))); while($this-db-next_record()) { $uid = $this-db-f("user_id"); $this-auth["perm"] = $this-db-f("perms"); } return $uid; } } /* test to see if everyting is working well with db-backend*/ $db = new TIMEKEEPER_DB; $db-query("select count(*) as count from auth_user"); $db-Next_Record(); $count = $db-f("count"); //count gives 2 which is correct SO OK $username="webadmin"; $password="wwwadmin"; $database_table="auth_user"; $db-query(sprintf("select * from %s where ( username = '%s' ) and ( password = '%s' )", $database_table, addslashes($username), addslashes($password))); $db-Next_Record(); $uid = $db-f("user_id"); //uid gives ... which is correct SO OK --- The must be something wrong with my loginform it does not submit the right values WHY ? -- 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] Checking if a web, a url really exists ?
Anybody got an idea on how to check if a url really exists ? -- 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] Up Downloading
Dos anybody has an idea how I can monitor uploads (Time, Size) and Downloads to and From my server with PHP ? Steve -- 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 Parsing through Proxy
Hi Anybody got an idea? I am sitting behind a proxy and I want to able to parse an XML. So I have to use fsockopen() to get through my firewall and get the page. So far, everything goes wel, but I am not able to parse the file, because I think it is not in XML format if I use "GET http:// " Does anyone has an idea how I can solve this? My code so far (bits and pieces of anywhere :) ) Steve ?php # # Parse XML through Proxy # # // Define Variables # Proxy Settings $proxy_ip="proxy.server.be"; $proxy_port=8080; # XML Mapping $map_array = array( "NASDAQAMEX-DOT-COM" = "HEADER_TAG", "ISSUE-NAME" = "STOCK_NAME", "LAST-SALE-PRICE" = "LAST_SALE", "PREVIOUS-CLOSE-PRICE" = "PREVIOUS_SALE", "NET-CHANGE-PRICE" = "CHANGE", "NET-CHANGE-PCT" = "CHANGE_PCT", "TODAYS-HIGH-PRICE" = "TODAYS_HIGH", "TODAYS-LOW-PRICE" = "TODAYS_LOW", ); # XML File to Parse $xmlFile_Location="http://quotes.nasdaq.com/quote.dll?page=xmlmode=stocksy mbol=NETA"; // Functions # StartElement Of Parser function startElement($parser, $name, $attrs=''){ global $map_array, $temp, $current_tag; $current_tag = $name; if ($format = $map_array[$name]){ switch($name){ case 'NASDAQAMEX-DOT-COM': //echo $HTTP_GET_VARS['ticker']; break; default: break; } } } # EndElement Of Parser function endElement($parser, $name, $attrs=''){ global $map_array, $temp, $current_tag; if ($format = $map_array[$name]){ switch($name){ case 'NASDAQAMEX-DOT-COM': return_page($temp); $temp = ''; break; default: break; } } } # Process the Data between XML-Tags function characterData($parser, $data){ global $current_tag, $temp, $catID; switch($current_tag){ case 'ISSUE-NAME': $temp['STOCK_NAME'] = $data; $current_tag = ''; break; case 'LAST-SALE-PRICE': $temp['LAST_SALE'] = $data; $current_tag = ''; break; default: break; } } # Create the XML Parser and set options $type="UTF-8"; $xml_parser = xml_parser_create($type); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_set_element_handler($xml_parser, 'startElement','endElement'); xml_set_character_data_handler($xml_parser, 'characterData'); /* Open a connection through Proxy with Nasdaq and start parsing */ $sockPointer = fsockopen($proxy_ip,$proxy_port, $errNo, $errStr,30); //Connect to Proxy if( !$sockPointer ){ echo "$errStr Proxy not Available \n\n"; exit(); } else{ fputs($sockPointer,"GET $xmlFile_Location/ ?xml version=\"1.0\" ?\n\n"); while (!feof($sockPointer)){ $Data = fgets($sockPointer, 10); $tag= "?xml version=\"1.0\" ?\n\n"; if( eregi("xml version",$Data) ){ $Parse=1; } if($Parse==1){ if (!($Data = utf8_encode($Data))){ echo 'ERROR'."\n"; } if (!xml_parse($xml_parser, $Data, feof($sockPointer))){ die(sprintf( "XML error: %s at line %d\n\n", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } } } fclose($sockPointer); } xml_parser_free($xml_parser); ? -- 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 Parsing The Sequel II
-Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: zondag 11 februari 2001 11:13 To: PHP Mailing Listl (E-mail) Subject:[PHP] XML Parsing The Sequel II Ok, yesterday I had problems parsing an XML from Nasdaq. Thx to Matt these problems have been solved and I am know able to parse any XML without problems (I hope). But I have one question: In order to parse an XML you have to tell your parser where to find the document: $xml_file = ''test.xml'; This works perfectly, but If you want to get the XML files from Nasdaq you have to say $xml_file = http://quotes.nasdaq.com/quote.dll?page=xmlmode=stocksymbol=NETA; This however doe not work !!! Why? How can I overcome this problem? -- 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 Parsing The Sequel II
I think I found the problem. Because I am behind a proxy I can not connect to http://quotes.nasdaq.com. And get the data !!! -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: zondag 11 februari 2001 11:13 To: PHP Mailing Listl (E-mail) Subject:[PHP] XML Parsing The Sequel II Ok, yesterday I had problems parsing an XML from Nasdaq. Thx to Matt these problems have been solved and I am know able to parse any XML without problems (I hope). But I have one question: In order to parse an XML you have to tell your parser where to find the document: $xml_file = ''test.xml'; This works perfectly, but If you want to get the XML files from Nasdaq you have to say $xml_file = http://quotes.nasdaq.com/quote.dll?page=xmlmode=stocksymbol=NETA; This however doe not work !!! Why? How can I overcome this problem? -- 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]
FW: [PHP] XML Parsing The Sequel II
-Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 12 februari 2001 21:52 To: 'Steve Haemelinck' Subject:RE: [PHP] XML Parsing The Sequel II Ok, I solved the problems with my proxy, I can get the xml but I can not get it completely. Why? Because I am not able to open the tags and that is why it stops at the first one. Does anyone has an idea how I can open the tags ? This is my code so far :) function GetXMLData($xmlFile_Location){ # Proxy Settings $proxy_ip="proxy.server.be"; $proxy_port€80; /* Get the required data from Nasdaq */ $sockPointer = fsockopen($proxy_ip,$proxy_port, $errNo, $errStr,30); //Connect to Proxy if( !$sockPointer ){ echo "$errStr Proxy not Available \n \n"; exit(); } else{ fputs($sockPointer,"GET $xmlFile_Location / HTTP/1.0\n\n"); while (!feof($sockPointer)){ $Data .= fgets($sockPointer, 1000); } } /* Store the locally for Parsing */ SaveDataLocally($Data, ".xml"); } -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: maandag 12 februari 2001 20:42 To: 'Steve Haemelinck' Cc: PHP Mailing Listl (E-mail) Subject:RE: [PHP] XML Parsing The Sequel II I think I found the problem. Because I am behind a proxy I can not connect to http://quotes.nasdaq.com. And get the data !!! -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: zondag 11 februari 2001 11:13 To: PHP Mailing Listl (E-mail) Subject:[PHP] XML Parsing The Sequel II Ok, yesterday I had problems parsing an XML from Nasdaq. Thx to Matt these problems have been solved and I am know able to parse any XML without problems (I hope). But I have one question: In order to parse an XML you have to tell your parser where to find the document: $xml_file = "test.xml'; This works perfectly, but If you want to get the XML files from Nasdaq you have to say $xml_file = http://quotes.nasdaq.com/quote.dll?page=xmlmode=stocksymbol=NETA; This however doe not work !!! Why? How can I overcome this problem? -- 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 Parsing The Sequel II
Ok, yesterday I had problems parsing an XML from Nasdaq. Thx to Matt these problems have been solved and I am know able to parse any XML without problems (I hope). But I have one question: In order to parse an XML you have to tell your parser where to find the document: $xml_file = ''test.xml'; This works perfectly, but If you want to get the XML files from Nasdaq you have to say $xml_file = http://quotes.nasdaq.com/quote.dll?page=xmlmode=stocksymbol=NETA; This however doe not work !!! Why? How can I overcome this problem? -- 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 Parsing The Sequel II
But how can I automate the saving locally of the file !!! -Original Message- From: Dave [mailto:[EMAIL PROTECTED]] Sent: zondag 11 februari 2001 14:44 To: PHP Mailing Listl (E-mail) Subject:RE: [PHP] XML Parsing The Sequel II here is some logic, I'm sure you can flesh out the code. fopen -r the URL read the results into a variable, fopen -w to write a local temp file (if the parser you build actially requires a "file") save it locally and pass the filename variable to your XML parser function if your parser can work from a variable, then just pass the read variable to your parser. Dave -Original Message----- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 11, 2001 5:13 AM To: PHP Mailing Listl (E-mail) Subject: [PHP] XML Parsing The Sequel II Ok, yesterday I had problems parsing an XML from Nasdaq. Thx to Matt these problems have been solved and I am know able to parse any XML without problems (I hope). But I have one question: In order to parse an XML you have to tell your parser where to find the document: $xml_file = ''test.xml'; This works perfectly, but If you want to get the XML files from Nasdaq you have to say $xml_file = http://quotes.nasdaq.com/quote.dll?page=xmlmode=stocksymbol=NETA; This however doe not work !!! Why? How can I overcome this problem? -- 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 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] Parsing XML
I want to parse an XML from nasdaq, but I allways get a blank page when doing so. I also get the notice: undefined index when parsing. What does this mean? -- 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] Parsing XML the Sequel :)
The page I want to parse is: http://213.224.136.110:8080/test.xml And this is my code: ?php //Define Opening Tags of XML $open_tags = array( 'STORY' = 'nasdaqamex-dot-com', 'STOCK_NAME' = 'issue-name', 'LAST_SALE' = 'last-sale-price', 'PREVIOUS_CLOSE' = 'previous-close-price', 'NET_CHANGE_PCT' = 'net-change-pct', 'STOCK_URL' = 'issuer-web-site-url'); //Define Closing Tags of XML $close_tags = array( 'STORY' = '/nasdaqamex-dot-com', 'STOCK_NAME' = '/issue-name', 'LAST_SALE' = '/last-sale-price', 'PREVIOUS_CLOSE' = '/previous-close-price', 'NET_CHANGE_PCT' = '/net-change-pct', 'STOCK_URL' = '/issuer-web-site-url'); // handles the attributes for opening tags // $attrs is a multidimensional array keyed by attribute // name and having the value of that attribute function startElement($parser, $name, $attrs=''){ global $open_tags, $temp, $current_tag; $current_tag = $name; if ($format = $open_tags[$name]){ switch($name){ case 'STORY': echo 'New Story: '; break; default: break; } } } // $current_tag lets us know what tag we are currently // dealing with - we use that later in the characterData // function. // // when we see a /STORY we know that it is time to // flush our temp variables and prepare to move onto // the next one function endElement($parser, $name, $attrs=''){ global $close_tags, $temp, $current_tag; if ($format = $close_tags[$name]){ switch($name){ case 'STORY': return_page($temp); $temp = ''; break; default: break; } } } // this function is passed data between elements // theu $data would equal 'Title Here' // in the line TITLETitle Here/TITLE function characterData($parser, $data){ global $current_tag, $temp, $catID; switch($current_tag){ case 'STOCK_NAME': $temp['stock_name'] = $data; $current_tag = ''; break; case 'LAST_SALE': $temp['last_sale'] = $data; $current_tag = ''; break; default: break; } } function return_page() { global $temp; echo 'o A HREF="'.$temp['stock_name'].'"'.$temp['last_sale'].'/ABR'; } // what are we parsing? $xml_file = 'test.xml'; // declare the character set - UTF-8 is the default $type = 'UTF-8'; // create our parser $xml_parser = xml_parser_create($type); // set some parser options xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); // this tells PHP what functions to call when it finds an element // these funcitons also handle the element's attributes xml_set_element_handler($xml_parser, 'startElement','endElement'); // this tells PHP what function to use on the character data xml_set_character_data_handler($xml_parser, 'characterData'); if (!($fp = fopen($xml_file, 'r'))) { die("Could not open $xml_file for parsing!\n"); } // loop through the file and parse baby! while ($data = fread($fp, 4096)) { if (!($data = utf8_encode($data))) { echo 'ERROR'."\n"; } if (!xml_parse($xml_parser, $data, feof($fp))) { die(sprintf( "XML error: %s at line %d\n\n", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } } xml_parser_free($xml_parser); //Just to see if it has done something echo 'yahoo'; ? -- 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] [Newbie] PHP Variables
I just wanted to try this: I take a link : http//www.xy.com/index.php?contents=HOME There I echo contents ?php echo $contents? div align="center"?php echo $contents; ?/div It should display HOME? But it does not ! -Original Message- From: Brian V Bonini [mailto:[EMAIL PROTECTED]] Sent: donderdag 8 februari 2001 23:55 To: Steve Haemelinck Subject:RE: [PHP] [Newbie] PHP Variables you can, what's the rest of your script look like. -Original Message----- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 3:49 PM To: PHP Mailing Listl (E-mail) Subject: [PHP] [Newbie] PHP Variables I thought you can pass variables in PHP as in CGI. http://www.xy.com/index.php?contents=HOME contents should be available as variable, but it does not seem to work. Doe anyone has an idea why not? -- 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] [Newbie] PHP Variables
Thx, I forgot to set the register_globals to On !!! -Original Message- From: Steve Edberg [mailto:[EMAIL PROTECTED]] Sent: vrijdag 9 februari 2001 20:41 To: Steve Haemelinck Cc: PHP Mailing Listl (E-mail) Subject:RE: [PHP] [Newbie] PHP Variables At 8:06 PM +0100 2/9/01, Steve Haemelinck wrote: I just wanted to try this: I take a link : http//www.xy.com/index.php?contents=HOME There I echo contents ?php echo $contents? div align="center"?php echo $contents; ?/div It should display HOME? But it does not ! Two possibilities I can think of: (1) Is your echo statement above within a function? If so, you have to globalize it, or pass it as a function parameter: function zaphod($beeblebrox) { return 'div align="center"'. $beeblebrox. '/div'; } echo zaphod($contents); or function zaphod() { global $contents; return 'div align="center"'. $contents. '/div'; } echo zaphod(); See http://www.php.net/manual/en/language.variables.scope.php for more info. (2) The register_globals parameter is not set. This must be on if you want GET/POST/COOKIE etc. parameters to be automagically converted to variables. This can be set in php.ini, .htaccess, or httpd.conf, and can also be programmatically set and checked via ini_set() and ini_get(), respectively. If this is NOT set, you'll have to refer to your GET parameter as $HTTP_GET_VARS['contents'] See http://www.php.net/manual/en/configuration.php http://www.php.net/manual/en/language.variables.external.php http://www.php.net/manual/en/function.ini-set.php http://www.php.net/manual/en/function.ini-get.php for more info. - steve -Original Message- From: Brian V Bonini [mailto:[EMAIL PROTECTED]] Sent: donderdag 8 februari 2001 23:55 To:Steve Haemelinck Subject: RE: [PHP] [Newbie] PHP Variables you can, what's the rest of your script look like. -Original Message- From: Steve Haemelinck [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 08, 2001 3:49 PM To: PHP Mailing Listl (E-mail) Subject: [PHP] [Newbie] PHP Variables I thought you can pass variables in PHP as in CGI. http://www.xy.com/index.php?contents=HOME contents should be available as variable, but it does not seem to work. Doe anyone has an idea why not? -- +--- "They've got a cherry pie there, that'll kill ya" --+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-- FBI Special Agent Dale Cooper ---+ -- 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] [Newbie] PHP Variables
I thought you can pass variables in PHP as in CGI. http://www.xy.com/index.php?contents=HOME contents should be available as variable, but it does not seem to work. Doe anyone has an idea why not? -- 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 Parsing with PHP
Where can I find some info on parsing XML with PHP? I am not looking for functions, but examples and explanations ! Thx -- 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] Zend Debug Server
With the following standard script: ?php phpinfo(); ? You can find it there -Original Message- From: Milan Mlynarcik [mailto:[EMAIL PROTECTED]] Sent: vrijdag 2 februari 2001 14:03 To: PHP mail list General Subject:[PHP] Zend Debug Server Does anybody know how should I recognise if Zend Debug Server is running ??? Milan Mlynarcik -- 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] Oracle failed to connect
Can you connect to the DB with sql plus !!! -Original Message- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: woensdag 31 januari 2001 13:36 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject:[PHP] Oracle failed to connect Hi! I'm using orcale8 and as long as oracle8 ocilogon does not work, i tried the oracle function and i always get: for Ora_Logon("kaab@KKAnn", "kaab"); connection failed could not resolve service name thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] -- 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] [Newbie] Php.ini
When I configure php4, is it possible to say it to look for the php.ini in /etc/php4? Which argument should I append to ./configure --?=/etc/php4 Steve THX -- 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] [NEWBIE] PHP.INI
I want to put the php.ini in /etc/php Which argument do I have to attach to ./configure --?=/etc/php to accomplish this ? THX -- 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] Oracle support not working
You have to make sure your environment variable ORACLE_HOME is set !!! CHECK: echo $ORACLE_HOME If it isn't modify the etc/profile or /etc/profile.local -Original Message- From: Brian Clark [mailto:[EMAIL PROTECTED]] Sent: zaterdag 27 januari 2001 23:25 To: PHP is not a drug . Subject:Re: [PHP] Oracle support not working Hello Jon, (JJ == "Jon Jacob") [EMAIL PROTECTED] divulged: (I'm no Oracle expert) JJ Well, I think I have done everything right but must have missed JJ something. I installed with --with-oci8 and --with-oracle, my Sometimes it doesn't pick it up correctly if you don't use the path when referring to --with-oracle. Try --with-oracle=/path/to/BASE/directory -Brian -- 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] PHP.INI
Should I place the error_log dir between quotes? "/var/log/php4/error.log" Or not? -- 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] PHP UltraEidt
Sometime ago I read that it is possible to configure UltraEdit to interprete PHP Code. Is this correct? Which configuration settings do I have to make in UltraEdit? Steve Haemelinck -- 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]