[PHP] Re: Running a PHP script on an automated regular schedule

2004-07-12 Thread Henry Grech-Cini
You may also want to look at wget as a way of invoking your PHP script if command line support is not available. Henry I.A. Gray [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi. I am wanting to use a PHP script to check on an hourly/daily basis on a few things- ie links on my

[PHP] Checking if a website is up?

2004-03-30 Thread Henry Grech-Cini
Hi All, I am trying to check if a website is up (reachable) and I have used the standard code below: Unfortunately this works for most sites but Microsoft doesn't work most of the time even thought the site is definiately up! (Occassionally it does say it is reachable but only occassionaly and

[PHP] Re: Ticketing system

2004-03-23 Thread Henry Grech-Cini
Hi I am using deskpro. see http://www.deskpro.com It's written in PHP, but it is not cheap. From my brief experience I would have to say however that it certainly seems to be worth it. Such a sophisticated ticketing system would take a very significant amount of time to build from scratch. HTH

Re: [PHP] How to make sure a redirect works

2004-03-11 Thread Henry Grech-Cini
Thankyou all, There's a lot of info here but I guess that I can summaries it as follows: 1) Do not redirect if the page is visited as the result of a POST 2) Keep text after header(Location: ...) to an absolute minimum. Namely a href=../a 3) Use absolute URLs not relative ones. 4) If you

[PHP] How to make sure a redirect works

2004-03-10 Thread Henry Grech-Cini
Hi All, I want to randomly select a desitniation page and use cookies to ensure that refreshes and return visits on the same machine always return to that desination (assuming the cookie is intact). Imagine that we have an array of URL's $url=array(1=dest1.html, dest2.html, dest3.html); // I'm

[PHP] Re: Are $_POST and $_GET interchangable?

2004-03-10 Thread Henry Grech-Cini
Hi You can use both $_GET and $_POST at the same time. As an example imagine that you had a script that generated a HTML form for collecting data. And image that that script generated different forms on the basis of a parameter passed in the URL (i.e. a $_GET value). Of the top of my head like

[PHP] Re: Warning: Cannot modify header information - headers already sent by (output sta

2004-03-10 Thread Henry Grech-Cini
Hi The problem is that the header requires that no output be generated by your script before it is invoked. It makes this clear in the error message when it indicates that on line 6 you produced output! Try this instead (although the code seems a little confused). ?php session_start();

Re: [PHP] regexp appears to be faulty!?

2004-02-25 Thread Henry Grech-Cini
Absolutely brilliant, also I'm using the /s modifier to process newlines as well. Great Thanks to everybody for their help. Jome [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Henry Grech-Cini [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Thanks for that Mike

[PHP] regexp appears to be faulty!?

2004-02-24 Thread Henry Grech-Cini
Hi All, function extractFieldsets($subject) { $regexp=/fieldset([^]*)[^(\/fieldset)]*/i; $replacement; $matches=array(); preg_match_all($regexp, $subject, $matches); return ($matches); } $result=extractFieldsets('testfieldset attribute=hellocontent of

[PHP] Re: regexp appears to be faulty (DONT actually think so)

2004-02-24 Thread Henry Grech-Cini
Hi All, I don't actually think regexp is fault. But if anyone could explain this or give me some example code that will extract the attributes and data between a fieldset tag pair I would be appreciated. Henry Henry Grech-Cini [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All

[PHP] Re: regexp appears to be faulty (DONT actually think so)

2004-02-24 Thread Henry Grech-Cini
Sven [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Henry Grech-Cini schrieb: ... $regexp=/fieldset([^]*)[^(\/fieldset)]*/i; ... $result=extractFieldsets('testfieldset attribute=hellocontent of hello/fieldsetemblah/emfieldset attribute=goodbyegoodbye/fieldset

Re: [PHP] regexp appears to be faulty!?

2004-02-24 Thread Henry Grech-Cini
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 24 February 2004 12:40, Henry Grech-Cini wrote: Hi All, function extractFieldsets($subject) { $regexp=/fieldset([^]*)[^(\/fieldset)]*/i; This: [^(\/fieldset)] will match any *single* character except the ones listed -- i.e

[PHP] Re: regexp appears to be faulty!?

2004-02-24 Thread Henry Grech-Cini
I came accross this link a href= http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html /a Do we all agree or should I keep trying? Henry -- PHP General Mailing List (http://www.php.net/)

[PHP] circumventing SAFE MODE Restriction

2003-04-03 Thread Henry Grech-Cini
Hi All, I want to get a list of files in my own sub-directory from where my .php file is. If I use dir(.) then I can list the file in the current directory BUT If I use dir(./subdirectory) or dir(subdirectory) I get the following error: Warning: SAFE MODE Restriction in effect. The script

[PHP] using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Hi All, I know that you will probably tell me to RTFM but I have (several times) and I cannot quite understand it! So failing that I turn to you for help. I know that this is very trivial but please humour me. I have a line containing From: Henry henry @ .com (please ignore any spaces

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Hi All, This has to be easy to do using preg_match! Can no one spare a minute of their time? Henry Henry Grech-Cini [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All, I know that you will probably tell me to RTFM but I have (several times) and I cannot quite understand

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
I tried if(preg_match(/^From:(.*)$/, $headers[$line], $info)) { echo [; print_r($info); echo ]; echo PRE,HtmlSpecialChars($headers[$line]),/PRE; } But all I get is [Array ( [0] = From: [1] = ) ] From: Henry henry @ .com Any pointers? Henry Grech-Cini [EMAIL

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Found a solution if (preg_match(/Form:[ ]*(.+)[ ]*(.+)/, Form:Henry [EMAIL PROTECTED], $info)) { print_r($info); } else print Pattern not found; but I'm refining it so that it doesn't need the last bit, any more pointers appreciated!!! Thanks All Henry Henry Grech-Cini [EMAIL PROTECTED

[PHP] Session variable under PHP 4.0.6

2003-03-03 Thread Henry Grech-Cini
Hi All, I'm having a problem with session variables under PHP 4.0.6 on a secure server. I ran phpinfo and have attached the resulting page after the main body of this message. My test code looks like this Filename: index.php Page Start -- ?php session_start();

[PHP] where do you recommend I put useful code for people to use?

2003-03-03 Thread Henry Grech-Cini
Hi All, I've written some javascript that serializes javascript variables so that they can be sent to PHP and unserialized there. Is this silly thing to have done? i.e. is it already done or superfluous for some reason? Or, if it is not, where would I put the code to share it with others. Thing

[PHP] Re: Problems posting

2003-03-03 Thread Henry Grech-Cini
Did you send this post at 17:17 and did it arrive at 17:22? Niels Andersen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] When I post something here, it first appears several hours later. How can it be so? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Session variable under PHP 4.0.6

2003-03-03 Thread Henry Grech-Cini
('variable'); This is because 'register_globals' is enabled in the php.ini file. Kirk -Original Message- From: Henry Grech-Cini [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 9:34 AM To: [EMAIL PROTECTED] Subject: [PHP] Session variable under PHP 4.0.6 Hi All, I'm

[PHP] processing pop3 inbox

2003-03-03 Thread Henry Grech-Cini
Hi All, I need to process the inbox. Any pointers, I don't use Perl and would like to use PHP. Also I do not have PHP compiled for a comand line so I'll probably use a crontab and unix text based web browser to invoke the PHP page to process the inbox. TIA Any help much appreciated. Henry --

[PHP] Re: PHP shopping carts

2003-03-03 Thread Henry Grech-Cini
Hi, Please let me know if you find one thats any good? Henry Dan Sabo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, What I'm looking for is either an open source or commercial solution which is supported by either commercial or OS add on modules. I've looked at OS commerce

[PHP] Using php as a scripting language within cron jobs?

2002-05-17 Thread Henry Grech-Cini
Hi All, Is this possible? I really don't want to go back to perl5 to setup an autoresponder system! Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Newline in fputs

2002-05-16 Thread Henry Grech-Cini
($file_name); ? Appart from the fact that the Content-Disposition appears not to be working under IE6 since the file name is not correct. The downloaded file does not contain Windows type carriage returns of newlines! However it does contains the data thank goodness. What is the fix? Henry Grech-Cini

[PHP] Re: fsockopen

2002-05-16 Thread Henry Grech-Cini
I'm confused! Did you want to make a new post for this comment or a reply to another post. Or does it in some way relate to my question. On my newsgroup browser it appears as if this post is in the wrong place! In answer to my post on Newlines in fputs Thanks for responding anyway. Henry