php-general Digest 30 Jul 2005 12:17:02 -0000 Issue 3596

2005-07-30 Thread php-general-digest-help
php-general Digest 30 Jul 2005 12:17:02 - Issue 3596 Topics (messages 219647 through 219669): Automated Numerical Filenames for Directory 219647 by: Smittie 219659 by: Smittie 219664 by: Kevin Waterson Re: PHP code in a MySQL record 219648 by: André Medeiros

Re: [PHP] Re: Automated Numerical Filenames for Directory

2005-07-30 Thread Kevin Waterson
This one time, at band camp, Smittie [EMAIL PROTECTED] wrote: Okay - figured it out and have it working now What was your solution? Kevin -- Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote. -- PHP General Mailing List

Re: [PHP] PHP noobie

2005-07-30 Thread Bob Stia
On Friday 29 July 2005 02:55, Jochem Maas wrote: Bob Stia wrote: Hello PHP list First allow me to apologize if this is the wrong place for this and direct me to the proper place. (be nice now!) this list is really for people who are programmning in php. as you describe it your looking

[PHP] Do I need to recompile Apache2 --with-apxs for PayPal PHP SDK?

2005-07-30 Thread John Hicks
I'm trying to install and configure PayPal Website Payments Pro using the PayPal PHP SDK. The first step in the SDK Quickstart instructions is: Enable Apache modules and APXS (Apache Extension Tool) In your Apache root directory, run: ../configure ?enable-mod=so --with-apxs

[PHP] Re: How to generate MD5 passwords

2005-07-30 Thread Michelle Konzack
Hello Matin, Am 2005-07-30 03:14:35, schrieb Martin B. Nielsen: Are you maybe looking for something like this: ? $passwords = test; $pass = md5($passwords); ^^^ I was missing this. echo $pass; ? The above will output: 098f6bcd4621d373cade4e832627b4f6 as

Re: [PHP] Dropdown Building Function

2005-07-30 Thread Satyam
Jack Jackson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Aaron, Thanks for showing me this it is very cool indeed. However maybe I am being dumb and obdurate but what I am really trying to do is build some of these things myself (with, thankfully, help) Perhaps this can

[PHP] error checking woes

2005-07-30 Thread Jack Jackson
Hi, Now that the drop down is working properly (thanks!!), I am trying to validate, and having LOTS of trouble. After being ceaselessly derided last night on an irc channel for my dimwitedness, I am still not any closer. The code which works is this: function GetQuestionsDropdown($cat){

Re: [PHP] error checking woes

2005-07-30 Thread Jack Jackson
Okay, last attempt before I hit my head against wall. I thought perhaps to add the error check to the dropdown function itself: function GetQuestionsDropdown($cat){ //first get all the questions $sql = SELECT * FROM questions WHERE questions.q_cat=$cat AND questions.q_style=1; $result =

[PHP] Redirect with referer info

2005-07-30 Thread Dotan Cohen
Hi list, I need to redirerect a page, and send the referer information along with the redirect. I have tried: header(Location: $url); and printhtmlheadmeta http-equiv='refresh' content='0; URL=$url' //head/html; Both of them redirect as expected, but the browser (Firefox and Opera) do not send

Re: [PHP] Redirect with referer info

2005-07-30 Thread Matt Darby
Dotan Cohen wrote: Hi list, I need to redirerect a page, and send the referer information along with the redirect. I have tried: header(Location: $url); and printhtmlheadmeta http-equiv='refresh' content='0; URL=$url' //head/html; Both of them redirect as expected, but the browser (Firefox and

Re: [PHP] Redirect with referer info

2005-07-30 Thread Joe Wollard
To obtain a certain portion of the referring url you might look at parse_url(); See http://us3.php.net/manual/en/function.parse-url.php - or - If you want to bounce the user right back to the previous page including get variables you could just use this snippet. ?php $referrer =

[PHP] Running a PHP script everyday

2005-07-30 Thread sub
I have a PHP script that I need to run once a day. I have it currently setup so that I just run it from my cell phone, but I would prefer something automated. I'd looked into a cron job, but that just looks like it's for doing linux command line stuff on my host. I also thought about writing a

[PHP] Help with Functions

2005-07-30 Thread Tom Chubb
I am trying to start using functions on some pages to layout a header row in a table. I have defined the function as below... ?php function (headerrow) { ? table width=750 border=0 cellpadding=0 cellspacing=0 bgcolor=#FF0066 tr td class=table_head?php echo $tablehead;

[PHP] help with print value

2005-07-30 Thread Jesús Alain Rodríguez Santos
Sorry for my english, i'm cuban, it's dificult for me explain that in english but I'll try: I have a table columns: month, day and value ||month||day||value 7 156 7 334 8 450 9 578 . . . . . . etc... I need to get the

[PHP] allowing selected file types

2005-07-30 Thread Sebastian
i know i shouldn't rely on mime types for file verification but anyways.. I use application/zip which works fine on firefox and only allows zips.. however, on Internet explorer it doesn't work since IE returns application/x-zip-compressed for zips.. problem with this is it also allow rar

Re: [PHP] Redirect with referer info

2005-07-30 Thread Dotan Cohen
On 7/30/05, Joe Wollard [EMAIL PROTECTED] wrote: To obtain a certain portion of the referring url you might look at parse_url(); See http://us3.php.net/manual/en/function.parse-url.php - or - If you want to bounce the user right back to the previous page including get variables you could

Re: [PHP] Help with Functions

2005-07-30 Thread sub
I would recomend for sanity and clean code that you define your functions outside of the file you will be calling it from and include that file in any file you need to call a function from. Here's a function that I defined in my db.php file.

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread James Kaufman
On Sat, Jul 30, 2005 at 09:17:20AM -0700, [EMAIL PROTECTED] wrote: I have a PHP script that I need to run once a day. I have it currently setup so that I just run it from my cell phone, but I would prefer something automated. I'd looked into a cron job, but that just looks like it's for doing

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread sub
In my pevious hunt through cron I didn't even notice the PHP CLI. So I will be figuring that out today probably. My server runs on Linux. Not sure which distro though. I'll have to ask. My script will be getting e-mail addresses from my SQL db and sending them a pic of the day. I got the

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread Matt Darby
[EMAIL PROTECTED] wrote: In my pevious hunt through cron I didn't even notice the PHP CLI. So I will be figuring that out today probably. My server runs on Linux. Not sure which distro though. I'll have to ask. My script will be getting e-mail addresses from my SQL db and sending them a pic

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread André Medeiros
You can cron the script to run. Do the following: 1) Add #!/usr/bin/php as the first line on your .php file. If /usr/bin/php isn't where your php binary lives, type whereis php to find out 2) Make sure you chmod +x your php script. 3) http://www.linuxforums.org/tutorials/1/tutorial-4017.html On

Re: [PHP] allowing selected file types

2005-07-30 Thread André Medeiros
You might want to read up on this: http://en.wikipedia.org/wiki/Magic_number_%28programming%29 On 7/30/05, Sebastian [EMAIL PROTECTED] wrote: i know i shouldn't rely on mime types for file verification but anyways.. I use application/zip which works fine on firefox and only allows zips..

[PHP] hide bbcode for spell checking!

2005-07-30 Thread Sonia
This is what it needs to do! The first tag that is found will set where the parser will insert '!-- / sc' before that tag. Any bbcode tags that are in the current tag will be skipped over until the parser finds the end of the current bbcode tag it is working on. Once it finds the end of the

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread Rory Browne
If your script needs to be run by the webserver - if for some reason cli won´t work for you, then you could always automate a call to the webserver using wget. You can get wget for win32 as well as Unix/Linux, so you shouldn´t have any problems here. On 7/30/05, André Medeiros [EMAIL PROTECTED]

[PHP] execution time of ';'

2005-07-30 Thread Andy Pieters
Hi all We develop our software with built-in debug handlers that are very talkative. Each class registers itself to a central debug handler. When a conditional define NODEBUG is set, that debughandler just does a return null but obviously it takes time to perform that call. We are thinking

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread M Saleh EG
If you're on windows desktop try this... it might sound a lil lame but it works. Schedule a task to open IE or FF and pass a url to the task . That's it. The task will execute that page in a given interval. On 7/30/05, Rory Browne [EMAIL PROTECTED] wrote: If your script needs to be run

Re: [PHP] exec nor shell_exec not doing as expected.

2005-07-30 Thread Rory Browne
Does the command work when you try it from the command line? If so, then try shell_exec(env some_filename) and show us the results. If not, then the problem is with your command. First thing I would check is the existance of /usr/local/bin/mogrify On 7/29/05, leonski [EMAIL PROTECTED] wrote:

Re: [PHP] Help with Functions

2005-07-30 Thread Rory Browne
You're declaring your function wrong. You're doing: function (function_name) You should be doing function function_name($arg1, $arg2, $arg3) // with as many comma seperated arguments as you want. or if you don´t want to pass any arguments function function_name() Try this out: function

Re: [PHP] PHP noobie

2005-07-30 Thread Rory Browne
On 7/30/05, Bob Stia [EMAIL PROTECTED] wrote: On Friday 29 July 2005 02:55, Jochem Maas wrote: Bob Stia wrote: Hello PHP list First allow me to apologize if this is the wrong place for this and direct me to the proper place. (be nice now!) this list is really for people who are

Re: [PHP] execution time of ';'

2005-07-30 Thread Jochem Maas
Andy Pieters wrote: Hi all We develop our software with built-in debug handlers that are very talkative. Each class registers itself to a central debug handler. When a conditional define NODEBUG is set, that debughandler just does a return null but obviously it takes time to perform that

Re: [PHP] PHP Spider/Crawler for Emails possible?

2005-07-30 Thread Jochem Maas
Jay Blanchard wrote: [snip] Pardon my ignorance but can you enlighten me a little more please? Like where can I look for them or how to code? [/snip] Start here http://www.php.net/file_get_contents [snip] As always all members are more than welcome to ask me for graphics I hope to be

Re: [PHP] Help with Functions

2005-07-30 Thread Tom Chubb
Thanks guys for all your help. I've managed to get it working. I tried calling the function from within the file and it turned out that somehow I had messed up my include statement. I understood about adding argument variables to the syntax, but I needed to add a text argument as I couldn't think

[PHP] input type=file problem (Maybe 0T)

2005-07-30 Thread Ryan A
Hey, Heres what I am doing, I have a form where a user can enter values and in the form I have a FILE box so the user can upload her pic, if she screws up anywhere (eg: putting an alphabet in her date of birth) I send her back to the form and her date of birth gets highlighted plus the value she

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread Ryan Grange
And how do you automate closing the browser when it's job is done? I believe the wget method mentioned earlier might be more appropriate. Even Lynx for Windows set to dump output (rather than stay open for browsing) would be better than leaving IE or FF open. M Saleh EG wrote: If you're on

Re: [PHP] input type=file problem (Maybe 0T)

2005-07-30 Thread Edward Vermillion
Ryan A wrote: Hey, Heres what I am doing, I have a form where a user can enter values and in the form I have a FILE box so the user can upload her pic, if she screws up anywhere (eg: putting an alphabet in her date of birth) I send her back to the form and her date of birth gets highlighted

Re: [PHP] input type=file problem (Maybe 0T)

2005-07-30 Thread Ryan A
clip setting a VALUE=path/file but that does not work. /clip As far as I know, you can't set the initial values for 'file' inputs. It's a security thing. H, you're right,saw the same thing on google after digging a little deeper, thanks mate. Cheers, Ryan -- PHP General Mailing

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread sub
I can't figure out how to get into command line access through my webhost. I've tried telnet and it fails. My host uses cPanel. When I setup the crontab it e-mails me back this response: /bin/sh: public_html/wap/mailer/dailylist.php: /usr/bin/php : bad interpreter: No such file or directory I'm

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread Robert Cummings
On Sat, 2005-07-30 at 18:21, [EMAIL PROTECTED] wrote: I can't figure out how to get into command line access through my webhost. I've tried telnet and it fails. My host uses cPanel. When I setup the crontab it e-mails me back this response: /bin/sh: public_html/wap/mailer/dailylist.php:

[PHP] dynamic two column table

2005-07-30 Thread Sebastian
i know how to break up db results into two tables but im having a hard problem with this: db structure --- | id | cid | title --- | 1 | 2 | hardware | 2 | 3 | software | 3 | 3 | software | 4 | 2 | hardware how can i have hardware on column 1 and software on

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread Miles Thompson
That's not lame, it's just Windows version of cron. You can also set it up using at from the console, but it still shows up in Task Manager. M. At 04:03 PM 7/30/2005, M Saleh EG wrote: If you're on windows desktop try this... it might sound a lil lame but it works. Schedule a task to open

Re: [PHP] Running a PHP script everyday

2005-07-30 Thread Miles Thompson
If you're on Windows, use Task Manager and have it start an instance of a web browser, with your URL and script passed to it. or Cron job on server, if you have that level of access. Miles At 01:17 PM 7/30/2005, [EMAIL PROTECTED] wrote: I have a PHP script that I need to run once a day. I

Re: [PHP] help with print value

2005-07-30 Thread Miles Thompson
You're talking about a table in a database, correct? Assuming the database is MySQL, you would: 1. open a connection to the database 2. execute a SQL select statement to fetch the data 3. process the results, formatting them into HTML. There are a number of tutorials on doing this, but it's