[PHP] Finding first/last occurrence of a substring

2005-01-17 Thread Vikram Vaswani
Hi I have a string like this: Just when you begin to think the wagon of Vietnam-grounded movies is grinding to a slow halt, you’re hit squarely in the face with another one. However, while other movies depict the gory and glory of war and its effects, this centres on the psychology of troop

RE: [PHP] Finding out when a Web page has changed

2002-09-26 Thread Vikram Vaswani
e not thinking it changed just b/c of something in the >headers... > >---John Holmes... > >> -Original Message- >> From: Vikram Vaswani [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, September 26, 2002 7:04 AM >> To: [EMAIL PROTECTED] >> Subject: [PHP

Re: [PHP] Finding out when a Web page has changed

2002-09-26 Thread Vikram Vaswani
>> I need to write an application that accepts a list of URLs and checks them >> on a daily basis (via cron) to see if the pages have changed in the past day. >> >> I need some help with this. Does anyone know the most optimal way to find >> out when a particular Web page has been modified? I am

[PHP] Finding out when a Web page has changed

2002-09-26 Thread Vikram Vaswani
Hi all, I need to write an application that accepts a list of URLs and checks them on a daily basis (via cron) to see if the pages have changed in the past day. I need some help with this. Does anyone know the most optimal way to find out when a particular Web page has been modified? I am thinki

[PHP] Classes versus native functions

2002-01-04 Thread Vikram Vaswani
Hi, I was wondering if anyone knew (and could quantify) the performance difference between a script that uses PHP's native XML functions - for example, DOM functions to add/remove nodes - and one that simulates these functions via a class - like the PHP.XPath class. I would assume that simulatin

[PHP] DTD validation with DOM parser

2001-10-25 Thread Vikram Vaswani
Hi all, Anyone know how to validate an XML document with the PHP DOM/libxml parser? Code would be helpful. :) TIA, Vikram -- 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 adminis

[PHP] Entity handling in DOM

2001-10-25 Thread Vikram Vaswani
Hi all, If I have an entity reference in an XML document, which I', parsing with the libxml PHP/DOM parser - does anyone know how I can [1] expand entities and [2] read in and parse external entities? Code would be helpful. :) TIA, Vikram -- PHP General Mailing List (http://www.php.net/) To

[PHP] XSLT error functions

2001-10-20 Thread Vikram Vaswani
Hi all, Am working with the XSLT functions in PHP. I'm trying to trap errors with the xslt_error() functions - however, the function generates no output even if I deliberately introduce errors into the XSLT sheet. Same goes for the openlog() function. Any one have any ideas how I can use these t

[PHP] WDDX recordset data

2001-08-07 Thread Vikram Vaswani
Can anyone point me to a resource which explains how to iterate through WDDX recordsets with PHP? Thanks! Vikram -- I wouldn't recommend sex, drugs, and insanity for everyone, but it works for me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For a

[PHP] Passing HTTP_POST from one script to another

2001-08-07 Thread Vikram Vaswani
Hi, 'nother question: if I have a form which submits data in POST to script "a.php", and I now want to pass this POSTed data to "b.php" - how do I do this? I have tried the technique of iterating through $HTTP_POST and concatenating the key-value pairs into a GET URL, which works perfectly. Howe

[PHP] Connecting to WDDX server in PHP

2001-08-07 Thread Vikram Vaswani
Hi, I have a script running on a server, which retrieves some values from a DB and encodes them into WDDX. I have another script running on the client, which deserializes WDDX and SAX-parses the XML data. How do I connect the two, so that the client script connects to the server, runs the serve

[PHP] connect() vs. pconnect()

2001-07-04 Thread Vikram Vaswani
Hi, I need some help with a class that I am writing. class myclass { function query($query) { // connect $connection = mysql_connect($this->hostname, $this->user, $this->pass) or die ("Cannot connect to database"); // run query $ret = mysql_db_quer

[PHP] Help with DB abstraction layer and Menu class

2001-07-02 Thread Vikram Vaswani
Hi all, I am developing a simple PHP menu class - the goal is to use PHP and a mySQL database to quickly generate a menu tree. I require some assistance with the database abstraction I am trying to use: My entire menu is stored in a "menu" table containing these fields: id - id of record (AUTOI

[PHP] Using PHP to test if server is online

2001-07-02 Thread Vikram Vaswani
Hi again, I am writing a PHP script to test if the server on which it is running is currently connected to the Internet. If so, the main page will display a notice saying "We are now online", else it will say "Not connected" Any ideas on how to do this with PHP? I'm guessing it would involve som

[PHP] Job listings DB

2001-05-21 Thread Vikram Vaswani
Hi, I am designing a system for my company to get employee resumes via the Web, rather than paper. All resumes now go into a mySQL DB, which can be searched by HR (at least that's the theory :) Here are the scripts I will be writing. User pages Listings Descriptions Application form Admi

[PHP] PHP and IE5.5 download problem

2001-04-11 Thread Vikram Vaswani
Hi! I have a script which sends the following headers in order to get the client to display a "file save" prompt. > header ("Content-Type: application/octet-stream"); > header ("Content-Disposition: attachment; filename=$filename"); > readfile($filename); This works well on Netscape/lynx. Ho

[PHP] Question on manually instantiating a file download

2001-03-27 Thread Vikram Vaswani
ossible solutions to this problem? Please CC a copy of your response to [EMAIL PROTECTED] as well as the list (as I will be working on this @ home also and do not have access to the full digest there) Any help will be much appreciated. TIA, Vikram Vaswani -- Sex is like air. It's on

[PHP] File upload and database optimization questions

2001-03-26 Thread Vikram Vaswani
match is found will I display the filename. I suspect this approach is not optimal. Can anyone suggest a better approach? Any insight into these issues will be much appreciated. Please CC a copy of your response to [EMAIL PROTECTED] as well as the list (as I will be working on this @ home also

[PHP] optimal way of counting votes in online poll

2001-02-28 Thread Vikram Vaswani
any other, better way to do this? I am using mySQL as the database, and PHP to process the form and execute the query. Please CC your response to the address above also. TIA Vikram Vaswani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: [PHP] Regex for telephone number

2001-01-15 Thread Vikram Vaswani
01 +0500, Vikram Vaswani wrote: >>Hi! >> >>Can someone help me out with a regex to validate a phone number? > >We'd need to know what format of telephone numbers you're looking to >validate, first. > >Angus. > -- PHP General Mailing List (http://www.p

[PHP] Regex for telephone number

2001-01-15 Thread Vikram Vaswani
Hi! Can someone help me out with a regex to validate a phone number? Thanks Vikram -- 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]