Re: [PHP] WEB PAGE CALCI

2001-12-10 Thread Matthew Moreton

Hi Chamarty,

The function you are looking to use is:

filesize(file);

This will return the size of a file, surprisingly!  Use it on all the files
in your docuemnt and add the results.

Regards

Matt.
Email: [EMAIL PROTECTED]

- Original Message -
From: Chamarty Prasanna Kumar [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 12:16 PM
Subject: [PHP] WEB PAGE CALCI




 Hi All,

  Using PHP,is there any function for

 calculating the size of a Web page, means the size of

 everything the browser has to load to render the page.

 That includes the HTML file, all the graphics,

 animations, CSS, php. And the input being URL of the

 page.


 Thanks in advance,


 Kumar.



 --
 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] PREG

2001-12-07 Thread Matthew Moreton

Hi people.  I am having some trouble with the PREG functions in php.

Here's what I am trying to do...

First of all I am reading in a file which is 1.5mb's in size, it could be many more, 
going up to 8mb's, the contents of the file is input to a string.

The format of the file is as follows...

###quoted textquoted text##

the # represents a number, in the case of the first 3 numbers they are only ever 1 or 
2 digits long.  The final two digits can get to be rather big in size, thousands and 
millions.  Each element is seperated by a tab space and then a carriage return (\r) 
terminates each record.

I use preg_match_all to find all the lines that start with 1 and 1 as there first 
numbers, typically there will be 25 entries of 1 1.  So I am looking for all lines in 
this format:

11#quoted textquoted text##

I have the search pattern figured out, it is as follow:

preg_match_all(/($first)\t($second)\t([0-9]{1,2})\t\([^\]*)\\t\([^\]*)\\t([0-9]*)\t([0-9]*)\r/,
 $input, $output, PREG_SET_ORDER );

When this pattern finds a matching line beginning equal to $first and $second it will 
put all the elements of the record into the array $output. $output[0] being the array 
of the first elements found, $array[1] being the second line that was matched, and so 
on.

This pattern does actually work to some extent.  When the filesize is low (100kb) it 
works fine, but when I start to get over that filesize it becomes greedy and the 
$second value doesnt seem to be taken into account when it searchs.  It seems to 
return everything that equals the following:

1##quoted textquoted text##

Obviously not what I want.  Could this be some sort of overflow problem?  I am at a 
lost end here, so if anyone could offer some insight as to why it is not functioning 
correctly I would most welcome it.  Overwise the only solution I can think of is 
chopping up the input, I dont really want to go down that path, as it seems like a 
rather cheap workaround.

Thanks.

Matt



Re: [PHP] Getting started - what do I need?

2001-12-07 Thread Matthew Moreton

I would suggest downloading PHPtriad.  It installs Apache, PHP and mySQL all
set up and ready to go.  http://www.phpgeek.com to get it.

The only resources I have used to teach myself php and mysql is the
documentation provided at www.php.net and www.mysql.com respectively.

Good luck

Matt

- Original Message -
From: Indera [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 08, 2001 3:44 AM
Subject: [PHP] Getting started - what do I need?


 Hello,

 I have never used php or mysql before and want to know what tools I should
use so that I can start
 learning php and mysql. I would like to build basic things like a login
page and forms that append
 the data to a database. I went to the bookstore and think the book PHP
fast and easy web development
 is something that I could handle. I've read through some of the posts on
this news group and
 realized that there are tools that I can use as front ends for these
packages. I went to mysql.com
 and php.net and it seems that i can download both of these packages to my
computer for free. Any
 help would be greatly appreciated.

 Thanks
 Indera



 --
 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] Dynamic Navigation w/PHP

2001-11-19 Thread Matthew Moreton

My website has a navigation menu that is written to the browser depending on
what vars are set in the php script.  I store all the link names in an
array, then simply do a 'foreach' loop to write the output.  This would
allow me to add another menu item by just adding it into the array.

Simple example:

foreach($linkname as $key = $value)
{
echo a href={$linkname[$key]}.php{$linkname[$key]}/ABR\n;
}

You could do something similar to this, when you want a menu item to be
enabled you could append it to the array.

- Original Message -
From: Andy Woolley [EMAIL PROTECTED]
To: Mike Elkins [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 4:51 PM
Subject: Re: [PHP] Dynamic Navigation w/PHP


 Hi,

 You could try using a DHTML menu like the one at
 http://www.milonic.co.uk/menu

 The array of elements needed can be generated using PHP based on certain
 criteria.

 Let me know if you or anybody else would like a PHP script creating so
that
 you could generate menus based on values that you have in PHP.

 Regards
 Andy.


 - Original Message -
 From: Mike Elkins [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, November 19, 2001 4:17 PM
 Subject: [PHP] Dynamic Navigation w/PHP


  Hello All,
 
  I am looking for example code demonstrating the ability to dynamically
  modify website navigation based upon data in a database. Specifically
what
 I
  am trying to figure out is how to control what pages are available based
  upon whether they have been enabled in the database. I am developing a
  template driven website, with content controlled by the database which
  indicates what the customer has opted for. While ten pages might be
  available and part of the web site template, a given customer may have
 only
  paid for four, thus when his site is hit, only those four pages will be
  available in the navigation elements. Should the customer care to
request
 an
  additional feature (page), simply accessing the database and enabling it
  would make it immediately available.
 
  Any suggestions or pointers would be greatly appreciated.
 
  Michael
 


 --
 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: Re: [PHP] schedule a task

2001-11-19 Thread Matthew Moreton

You can launch IE with an address as a paramater from task scheduler.

Example:

C:\PROGRA~1\INTERN~1\IEXPLORE.EXE http://somehost.com/somepath/somescript.php

Matt.


Gab [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'll check with the tech support but nothng is mentioned on the website.
 I can transform the method into GET on the form, and could call the script.
 The only way I see so far is using thi URL as a default page in my Win
 browser and automate sschedule the task in windows, but i don't like that.
 
 
 
 
 Jack Dempsey [EMAIL PROTECTED] wrote in message
 007f01c1713a$2a18e140$[EMAIL PROTECTED]">news:007f01c1713a$2a18e140$[EMAIL PROTECTED]...
  you need some way of automating the process, and without cron
 automatically
  doing things for you, you're going to be pressed for a solution...i'm not
  sure what you could do because you need something to do this
  automatically...your host doesn't provide perl scripts to be cronned or
  anything like that? if not, i'm not sure what to tell you...
 
  jack
  - Original Message -
  From: Gab [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 19, 2001 3:32 PM
  Subject: Re: [PHP] schedule a task
 
 
   thanks for a quick response but I have a major problem with that:
   no shell access = can't use cron
  
   Any other idea?
   Gab
  
  
   Jack Dempsey [EMAIL PROTECTED] wrote in message
   005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
cron either a php script itself [if you've got it installed as a cgi]
 or
  a
lynx request of the page
check the archives as well [marc.theaimsgroup.com] because this comes
 up
every week or so
   
- Original Message -
From: Gab [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 3:15 PM
Subject: [PHP] schedule a task
   
   
 Hi,

 I have a form (POST method), that creates a back-up of a MySQL
  database
   as
 an SQL file when submited. I am looking for a way to automate this
  task
(ie
 on a daily basis at midnight).
 Any idea on how to do it in PHP? (if it is possible)

 Thanks

 Gab



 --
 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]