[PHP] Re: passing values from one script to another script

2003-03-16 Thread Alan McFarlane
Have a look at the $_POST super global variable documentation. "Chinmoy Barua" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hello everybody, > > I want to pass a value, which came from a HTML form, to another PHP script. How can i do this? > > e.g.: $login - the value of this

[PHP] Q. Adding line numbers to highlighted source

2003-04-03 Thread Alan McFarlane
t my regex does not correcly match the lines. Anyone got any bright ideas? -- Alan McFarlane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Q. Adding line numbers to highlighted source

2003-04-04 Thread Alan McFarlane
;0", STR_PAD_LEFT) . " " . $source[$i]; echo "" . implode("", $source) . ""; "Alan McFarlane" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've been trying to add line-numbers to my source code, but can'

Re: [PHP] Re: Q. Adding line numbers to highlighted source

2003-04-06 Thread Alan McFarlane
;,' style="color:black;">1',$file); > > $file = preg_replace('//e','sprintf(" style=\"color:black;\">%05d ",$i++)',$file); > > echo ""; > > echo $file; > > Enjoy! > > ---John W. Holmes... > &

[PHP] Trouble with named session vars in classes

2002-01-08 Thread Alan McFarlane
test1_data And on refreshing the browser: $test1->Execute reports: container['sequence'] = 3 container['signature'] = test1_data $test2->Execute reports: container['sequence'] = 2 container['signature'] = test2_data $test1->Execute reports: conta

[PHP] Re: PHP Parsing Database Text

2002-01-10 Thread Alan McFarlane
Look at (for example) the mySQL database suport for PHP. That will give you the basics for reading (and writing) database records. As for parsing this text, that's going to be up to you - I suppose ideally store the text in a 'structured' format: part1~part2~part3 etc then you can just use: $r

[PHP] Re: New to list

2002-01-10 Thread Alan McFarlane
try: $result = ((0.416/$time)*60)*60); echo number_format($result, 2); or echo sprintf("%.2f", $result); Andrew <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello to you all! > I am new to this list and I have a question that maybe someone can help with >

[PHP] POSTing files

2002-01-11 Thread Alan McFarlane
ourse that I still need the facility to browse the local system for a file Thanks -- Alan McFarlane [EMAIL PROTECTED] ICQ: 20787656 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

[PHP] Best way to get the remote IP address?

2002-01-21 Thread Alan McFarlane
Is there any generic solution to this problem (and if so, what is it?) Cheers -- Alan McFarlane [EMAIL PROTECTED] ICQ: 20787656 -- 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

[PHP] Re: upgrade problem

2002-01-25 Thread Alan McFarlane
It sounds like an inconsisteny in the library versions. Try and get the latetst version of the GD library, (source if necessary), or if you have a tool that is capable of analyzing .so/.dll dependancies, use that. Chuck Barnett <[EMAIL PROTECTED]> wrote in message 002301c1a607$c3dff1e0$[EMAIL PRO

[PHP] Re: HELP! with PHP extension <

2002-01-25 Thread Alan McFarlane
Make sure you've copied the contents of the c:\php\dlls folder to your system directory (\windows\system, \winnt\system32, not sure 'bout 2K). Your extension_dir setting in php.ini should be extension_dir = c:/php/extensions/ And make sure you've copied your php.ini to your windows directory (\

[PHP] Re: Encryption

2002-01-25 Thread Alan McFarlane
As far as I'm aware, as long as you use the same seed or salt value, encrypting material will always yield the same results. However, remember that not all servers have support for mcrypt... You may find it better to use something simpler like md5($seed . $data), where $seed is a unique (and hirea

[PHP] Re: Problem in mysql connection

2002-01-26 Thread Alan McFarlane
What is the error message? (It will help us a lot ) Uma Shankari T. <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > Hello, > > I have installed php4 rpm in my machine.while connecting php with > mysql it is giving fatal error.I have given like this

[PHP] Re: Calculate Directory Size

2002-01-26 Thread Alan McFarlane
I suggest using an external tool - using PHP would probably be too slow esp. if you're hitting 1000+ users. (Plus, I think you would have to run a lot of clearstatcache()'s which may cause all sorts of problems)... If you do an ls or dir or similar then you could parse the output, however there m

Re: [PHP] Correct URL's

2002-01-27 Thread Alan McFarlane
> > > Please do not send HTML messages. > > Sorry, Outlook is crap and I'm just too lazy to buy (on Win you have to ??? Outlook does not ~need~ to send HTML messages, it can be configured to send text-only messages Sheesh, It's about time you guys started looking properly at your environments an

Re: [PHP] PHP and MYSQL Security`

2002-01-27 Thread Alan McFarlane
If you know you are running on an apache server, you could try using a simple .htaccess file in a (say) etc directory which contains any or all files you wish to secure. ie: /index.php /etc/config.php /etc/.htaccess --index.php --etc/config.php $config['db_host']="sql"; $confi

[PHP] Is it possible to bypass max time limit?

2002-01-27 Thread Alan McFarlane
I've got a live script which occasional has to retrieve a file via ftp, download to the server, post-process it then display it. I use caching to check to see if I've already got the file, but if I don't I have to process the ftp_get operation which occasionally times out. So, is it possible to

[PHP] Re: Pregenerating Script Once Again Putting this question

2002-02-01 Thread Alan McFarlane
I tak you realise that according to your example interface, users will be browsing for files on their own system and ~not~ the server, are you sure this is what you want? After all, you'll never be able to verify the information contained within those files is viable, safe, legal etc. Karthikeya

[PHP] Re: Can this be done in PHP?

2002-02-01 Thread Alan McFarlane
Mmm - looks damn complex but it's really very simple - Get yourself a copy of phpAdsNew (from sourceforge.net) - It's an amazing banner thingy with all sorts of tricks for display adverts (text, graphics, flash, iframes, frames, layers, etc) and it's well documentated. Ed Lazor <[EMAIL PROTECTED]

[PHP] File Manager required

2002-02-01 Thread Alan McFarlane
I'm just being damn lazy, but has anyone got (or seen) a nice file simple file manager writtin in PHP? Facilities should include upload/download, copy,move,rename,delete, possibly view image/source... Thanks -- Alan McFarlane [EMAIL PROTECTED] 'I hate re-inventing the wheel!&#

[PHP] Sending files to the user...?

2002-02-05 Thread Alan McFarlane
The problem: How to I send a file to the user? Sounds simple but, assume I have a 'daily report' option from my main web page. When the user clicks on it, they are taken to the file 'generate_report.php' (sample included). Now, this code should generate the report, compress it if required and se

[PHP] Re: Sending files to the user...?

2002-02-05 Thread Alan McFarlane
Oh, and BTW, after sending the file, I will be redirecting the user to a different page... Alan McFarlane <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The problem: > > How to I send a file to the user? Sounds simple but, assume I

[PHP] Re: mktime() Algorithm

2002-02-06 Thread Alan McFarlane
Most langauges have support for this type of function - i.e. the number of seconds since 1970. Check your language manual... David A Dickson <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I need to create a function in another programming language that takes

[PHP] Version checking

2002-02-06 Thread Alan McFarlane
What's the best method for checking the PHP version number. I'm assuming that include() was available in all versions, so, from my main index.php script, I include a local script (common.php) : The problem I can see is that some of the earlier 4+ versions had a funny number scheme - i.e. 4.0.1

[PHP] Complex Version Checking

2002-02-07 Thread Alan McFarlane
Does anyone know of a method of testing the minimum version of PHP required for a particular job? - Assume I'm developing a web-site for a customer who has PHP 4.0.5 installed. Now, I tend to use the latest version (4.1.1), so I have to be a little careful in certain aspects, but it would be usefu

Re: [PHP] Php Projects

2002-02-09 Thread Alan McFarlane
I've already got the steady supply of beer, but a backup? remind me - what's that word mean again... Alan McFarlane (Just after suffering a major NT dual server crash when the bac Nick Wilson <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTEC

[PHP] Re: Console, colors and stuff

2002-02-09 Thread Alan McFarlane
Try 'echo'ing ansi control sequences? -- Alan Richard <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey Boys, > > I'm using PHP CGI version on Win32 to write some scripts. Not for a website > or anything, just some scripting at the console window. So now I w

[PHP] IE Combo Box & File Selector

2002-02-12 Thread Alan McFarlane
Sorry for being of topic, but I'm having great difficulty with this... The following code does NOT use a single border around the combo box as I would have expected. Any ideas as to why not? /* index.html */ 1 -- Alan McFarlane -- PHP General Mailing List (http://www.php.net

[PHP] File/Directory Permissions

2002-03-06 Thread Alan McFarlane
hen (and how) would it be done? -- Alan McFarlane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Use of flock()

2002-03-06 Thread Alan McFarlane
I've just written a couple of simple routines which read an write small text files to the server: function readData( $filename, &$data ) { if (!$fd = @fopen($filename, "r")) { return false; } flock($fd, LOCK_SH); $data = fread($fd, filesize($filename)); fclose($fd); return true; } fun

[PHP] header() and frames

2002-03-06 Thread Alan McFarlane
tion: index.php; target: _top"); Anyone got any suggestions or pointers? -- Alan McFarlane -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: header() and frames

2002-03-07 Thread Alan McFarlane
Nope, that didn't work... Jim Winstead <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Alan McFarlane <[EMAIL PROTECTED]> wrote: > > header("location: index.php; target: _top"); > > header("Location

[PHP] Re: Is flock necessary?

2002-03-07 Thread Alan McFarlane
ED]">news:[EMAIL PROTECTED]... > Group: Is flock even necessary? > Allan: You look like you have Perled. It was necessary for Perl. > Have you thought of MySQL instead? > > > Alan McFarlane wrote: > > > I've just written a couple of simple routines which read an wr

[PHP] Re: 'undef' as an argument value

2002-03-11 Thread Alan McFarlane
function foo( $arg1, $arg2 = null ) { .. as before .. } -- Alan McFarlane Rodent Of Unusual Size <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > An odd request.. I want to have optional function arguments > that *aren't*