Re: [PHP] Date () Help please

2002-07-15 Thread Attila

OK thought I should share in case any needs it but got it to work.  Here is
what it looks like and thanks to Richard Baskett for the help.

$yr= date (Y);
$mnth = date (F);
$dy= 1;
$string = "$dy $mnth $yr";
$today = date("w",strtotime($string));

Thanks for the help
Attila
http://www.glorynaspiration.com


"Attila" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok your way works and thanks for the help but still struggling a little
bit
> here is what I have.
>
> $year = date (Y);  //This gets me the current year 2002
> $month = date (m);   //This gets me the current month 07
> $day= 1;  //always looking for the 1st day of the
month
> $string = "$year $month $day";
> $today = date("w",strtotime($string));
> echo $today;
>
> My result is: 3
>
> What am I doing wrong should this work
>
> Thanks for the help
> attila
> http://www.glorynaspiration.com
>
>
>
>
> "Richard Baskett" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > $today = date("w"); // $today will result in '1'
> > $today = date("D"); // $today will result in 'Mon'
> > $today = date("l"); // $today will result in 'Monday'
> >
> > Now if you wanted to feed the script something like this:
> >
> > $string = "01 Jul 2002";
> > $today = date("l",strtotime($string));
> >
> > This will result in the long textual day of '01 Jul 2002', so 'Monday'
or
> if
> > you interchange the "l" in the first part of the date function with "w"
> you
> > will get the the day of the week, numeric, i.e. "0" (Sunday) to "6"
> > (Saturday) or if you use "D" you will get the short textual day so 'Mon'
> >
> > I hope all of that makes sense to you.  Check out the php manual for the
> > function date and strtotime.
> >
> > http://www.php.net/date
> > http://www.php.net/strtotime
> >
> > Rick
> >
> > "Trust in the Lord with all your heart, And lean not on your own
> > understanding; In all your ways acknowledge Him, And he shall direct
your
> > paths." - Proverbs 3:5-6
> >
> >
> > > From: "Attila" <[EMAIL PROTECTED]>
> > > Date: Mon, 15 Jul 2002 16:44:39 -0600
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Date () Help please
> > >
> > > Hello all,
> > >   I am very new to PHP and I have added some minor PHP to my website.
I
> > > would like to make a PHP calander to keep track of things going on.
> Could
> > > someone tell me how I can get the first day of every month.
> > >
> > > For Example:
> > > 01 Jul 2002 was a Monday.
> > > 01 Mar 2002 will be a Thursday
> > >
> > > I need the dates to start my tables so they insert the numbers in the
> right
> > > day.
> > >
> > > Thanks,
> > > Attila
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date () Help please

2002-07-15 Thread Attila

Ok your way works and thanks for the help but still struggling a little bit
here is what I have.

$year = date (Y);  //This gets me the current year 2002
$month = date (m);   //This gets me the current month 07
$day= 1;  //always looking for the 1st day of the month
$string = "$year $month $day";
$today = date("w",strtotime($string));
echo $today;

My result is: 3

What am I doing wrong should this work

Thanks for the help
attila
http://www.glorynaspiration.com




"Richard Baskett" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $today = date("w"); // $today will result in '1'
> $today = date("D"); // $today will result in 'Mon'
> $today = date("l"); // $today will result in 'Monday'
>
> Now if you wanted to feed the script something like this:
>
> $string = "01 Jul 2002";
> $today = date("l",strtotime($string));
>
> This will result in the long textual day of '01 Jul 2002', so 'Monday' or
if
> you interchange the "l" in the first part of the date function with "w"
you
> will get the the day of the week, numeric, i.e. "0" (Sunday) to "6"
> (Saturday) or if you use "D" you will get the short textual day so 'Mon'
>
> I hope all of that makes sense to you.  Check out the php manual for the
> function date and strtotime.
>
> http://www.php.net/date
> http://www.php.net/strtotime
>
> Rick
>
> "Trust in the Lord with all your heart, And lean not on your own
> understanding; In all your ways acknowledge Him, And he shall direct your
> paths." - Proverbs 3:5-6
>
>
> > From: "Attila" <[EMAIL PROTECTED]>
> > Date: Mon, 15 Jul 2002 16:44:39 -0600
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Date () Help please
> >
> > Hello all,
> >   I am very new to PHP and I have added some minor PHP to my website.  I
> > would like to make a PHP calander to keep track of things going on.
Could
> > someone tell me how I can get the first day of every month.
> >
> > For Example:
> > 01 Jul 2002 was a Monday.
> > 01 Mar 2002 will be a Thursday
> >
> > I need the dates to start my tables so they insert the numbers in the
right
> > day.
> >
> > Thanks,
> > Attila
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Date () Help please

2002-07-15 Thread Attila

Hello all,
I am very new to PHP and I have added some minor PHP to my website.  I
would like to make a PHP calander to keep track of things going on.  Could
someone tell me how I can get the first day of every month.

For Example:
01 Jul 2002 was a Monday.
01 Mar 2002 will be a Thursday

I need the dates to start my tables so they insert the numbers in the right
day.

Thanks,
Attila



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] HTTP_X_FORWARDED_FOR?

2002-01-10 Thread Attila Strauss


hi

try something like

$_SERVER["HTTP_X_FORWARDED_FOR"]

best regards
attila


>
> Hy,
>
>
> [EMAIL PROTECTED] wrote:
>
> > Hi,
> >
> > I just installed IIS 5.0 and PHP 4.1.1 on Win 2000, and I'm wondering
what happened to the HTTP_X_FORWARDED_FOR? I doesn't seem to exist on my
system. Is it just a variable that needs to be changed, or has it been
removed from PHP? Thanks.
>
>
>
> This has something to do with the way you access the machine -
> x-forwarder-for contains the private ip address of your client machine
> when calling the php pages through a proxy.
> It has nothing to do with your php or server side configuration.
>
> henning
>
>
>
>
> --
> 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] array_walk inside class method

2002-01-05 Thread Attila Strauss

hi

$this->func1();


best regards
attila


>
>
> Hi All,
> I want to use "array_walk" function inside a class method. But the
> problem is i want the second argument to array_walk ( function name )
> be a another function of the same class. when i gave like that its telling
>
> Error : function not exist.
>
> class some()
> {
>
> function func1()
> {
> }
> function func2()
> {
> array_walk($array,"func1");
> }
> }
>
> What is the syntax or way to do this.
>
>
> Thanks in Advance.
>
> S.Murali Krishna
> [EMAIL PROTECTED]
> =
> We grow slow trying to be great
>
>- E. Stanley Jones
> -
>
>
> --
> 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] "Email-based PHP-Script"

2001-12-18 Thread Attila Strauss

Hi


http://www.linuks.net/robot.phps

best regards
attila strauss




> Hello List,
>
> I'm currently trying to setup a script which is processing incomming
emails.
> So I setup PHP as CGI and did configurate the email like
>
> robot "|/path/to/the/script.php"
>
> The little testscript I tried looks like that:
>
>  $fp = fopen("php://stdin","r");
> while (!feof($fp))
> { $BUFFER = fgets($fp);
>$INPUT .= $BUFFER;
> }
> mail ("[EMAIL PROTECTED]", "Test", "$INPUT", "From: [EMAIL PROTECTED]");
> fclose($fp);
> ?>
>
> The error which I get is
>
> /path/to/the/script.php: cannot open ?: no such file
> 554 5.3.0 unknown mailer error 2
>
>
> Does anybody have some PHP code which would work to readout incomming
emails
> or knows that's wrong with my little script?
>
> Thanks a lot.
>
> Juergen
>
>
>
>
> --
> 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] Problem with Code

2001-12-16 Thread Attila Strauss

> Hi,
> 
> I have a couple of questions before I get to my problem.
> 
>1. Is there any documentation that explains the differences between
> the versions of PHP?
sure. have a look at the changelog
http://www.php.net/ChangeLog-4.php

> 
>   2. Does it matter when writing php code that you specifiy the file
> name in the following
>manner?  test.php3  test.php4 or whatever.  I'm assumming this is
> version specific.
> 
>   My Problem:
> 
>I have the following code:

[]

> 
> I have the following error:
> 
> 
> Fatal error: Call to unsupported or undefined function include_once() in
> include_fns.php3 on line 7
> 
> It seems to me that include_once is a legal function but I can't the
> orgination of this funtion other
> than that stupid include_fns.php3 file? Any ideas on this.
> 
> Configuration:
> 
> OS: Solaris 2.8 10/00 on Intel Hardware.
> Apache: 1.3.9
> PHP: 3.0.15
> mysql: 3.23.46
> 
> My ISP is running:
> 
> OS: Irix 6.4
> Apache: 1.3.9
> PHP: 3.0.9
> mysql: 3.22.23b
> 
> I do appreciate any help on this.
> 

include_once() was added in PHP 4.0.1pl2 

best regards
attila strauss


-- 
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] Re: php binary

2001-12-11 Thread Attila Strauss

Hi

simply recompile ur php _without_ the config options
--with-apxs
or
--with-apache ...

thats it

best regards
attila strauss


>
>  > Hi
> >
>  > Can someone tell me from where can I get the binary file of php so that
I
>  > can run php files from the command line of Unix.
>
> if linux check your distribution for binaries if you use another
> flavor of unix you need to recompile php with cgi support AFAIK.
>
> --
> Henrik Hansen
>
> --
> 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] Re: please don't flame : it's an editor-question

2001-12-06 Thread Attila Strauss

hi

http://www.itworks.demon.co.uk/phpeditors.htm

best regards
attila strauss

>
>
> > >I can't afford 299$ for an Texteditor,so :
> > >Does anyone know of a free/cheap Edtor that has this feature?
> >
> > On windows - PHPEdit (maybe even PHPCoder).
> > On linux - I, too would like to know, mabe emacs?.
> >
> > Roko
> >
> >
> >
> > --
> > 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]




Re: [PHP] PHP shopping cart packages

2001-12-05 Thread Attila Strauss

Heya,

http://www.hotscripts.com/PHP/Scripts_and_Programs/E-Commerce/Shopping_Carts
/

best regards
Attila Strauss


> >I need a new cart program and would like to use something based in PHP.
I
> >was using a CGI paltform written in C, but we had session problems out
the
> >wazoo when traffic was really high.  I need something that can manage
> >sessions with vim and vigor.  I have only see phpshop - which looks nice,
but
> >I wonder if there are other packages out there that are really good.
> >
> >Your thoughts appreciated!
>
> www.fishcart.org is worth to look at.. gets installed within 5 minutes..
>
> Bye,
>
>
> B.
>
>
> --
> 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] Piping into script...

2001-11-20 Thread Attila Strauss

hi

check this:

http://www.linuks.net/robot.phps

best regards
attila strauss




> 
> If I want to pipe, say an incoming email to a PHP script (assuming I
> have php compiled as a cgi binary), how do I deal with when it needs to
> receive the stream of data, how to figure out when there is no more
> coming before it actually start to parse the information?
> 
> And how do people deal with multiple requests and such?  There may
> be cases where there could be more than one email incoming at the same
> time...while theoretically the MTA only passes them one by one to
> whatever's next in line (whether it's procmail, or any other type of
> program)
> 
> --
> H | "Life is the art of drawing without an eraser." - John Gardner
>   +
>   Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
>   Director of Internet Operations / SysAdmin. 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
> 
> 
> 
> -- 
> 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] php from the command line

2001-09-25 Thread Attila Strauss

Hi

Simply put

/usr/local/bin/php -q to the top of your script ...
i've written one a while ago an email roboter ... it works on command line
maybe u wanna check it out :

http://linuks.net/robot.phps

best regards
attila strauss

>
>
> Hi!
> I was wondering how you could run php from the command line, and how it
works!
> Just out of curiosity =)
>
> Thanks
> /Broder
>
>




-- 
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] RE: newbie

2001-08-08 Thread Attila Strauss

hi,

try this:
 track.sql 
CREATE TABLE table_track (
   tid int(11) NOT NULL auto_increment,
   ip varchar(15) NOT NULL,
   PRIMARY KEY (tid),
   UNIQUE tid (tid),
   KEY tid_2 (tid)
);
# 



that would insert the users ip into the table table_track ...

check it out...
i hope i could help you

best regards
attila



> Hi, I'm a real newbie at this stuff and I have a little problem...  I read
> the manual but the answer to my questions were not clear. What I am trying
> do do is track down a user when he or she visits my site. I would like to
> store some information about them into mySql...Information like, username,
> ip, connection and most importantly what page of my site it is that they
> visited...I'm not sure if I have to use cookies or sessions or both and I
> especially don't know where to start..
>
> Can anyone give me some information or a link other than php.net
> PLEASEthank you.
>
>
> --
> 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] MySQL connection

2001-08-08 Thread Attila Strauss

hi,

there are 2 ways.

1. you hardcore the user/password in the php.ini file.
2. u do a simply error checking like :



of course you could also do like kindaheader("Location: http://host";);  instead of 
print "connection failed".

i hope i could help you.

best regards
attila strauss




> Hey Jouri,
> 
> 
> I don't agree with this one. I tested it out on my
> localhost and got the two error messages I told you I
> was going to get:
> 
> Warning: Unknown MySQL Server Host...
> Warning: MySQL Connection Failed...
> 
> No usernames/passwords. I have to say however that I
> always include my connect.php file. Maybe that's a
> secure way to connect without anyone seeing your
> password in case of sqlserver problems.
> 
> 
> Greetz,
> Bjorn Van Simaeys
> www.bvsenterprises.com
> 
> 
> 
> 
> --- BRACK <[EMAIL PROTECTED]> wrote:
> > If you have Apache and MySQL servers make this
> > experiment - 
> > start Apache but "forget" to start SQL and go to
> > your site 
> > http://localhost/... you will see yourself all the
> > information on the 
> > screen.
> > 
> > Youri
> > 
> > On 7 Aug 2001, at 12:53, Ryan Christensen wrote:
> > 
> > > I'm curious as to how the "hacker" would see all
> > this information (the
> > > username.. password, etc..) just by going to a
> > site where the SQL backend
> > > was down?
> > > 
> > > Ryan
> > > 
> > > > -Original Message-
> > > > From: BRACK [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, August 07, 2001 12:36 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP] MySQL connection
> > > >
> > > >
> > > > I just wanned to bring the issue of security of
> > MySQL connection:
> > > >
> > > > Let us imagine that SQL server was down for some
> > hours (of
> > > > course without us knowing it) and at the same
> > hours our SQL site
> > > > was visited by some kind of hacker, he can s
ee
> > on his screen all
> > > > our SQL connection info like username,
> > password, and database
> > > > name. You may hide this information in different
> > file than the file
> > > > that your users open then the hacker will see
> > something like
> > > > "include("connect.inc");" or
> > "require("connect.inc");" (of course IF
> > > > server is down). So you may only imagine the
> > consequences of
> > > > this visit of the hacker. What can we do to
> > protect our sensitive
> > > > information if SQL server is down?
> > > >
> > > > Youri
> > > >
> > > > --
> > > > 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]
> >
>
>
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> --
> 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] damn $REQUEST_URI

2001-06-25 Thread Attila Strauss

hi,

try

$SERVER_NAME

http://www.php.net/manual/en/ref.http.php

regards
attila strauss



> $REQUEST_URI gets me home/dir/index.php
> but I need to get the domain name.
> 
> Can't seem to find it anywhere, what's the environment variable for the 
> domain name again? Thanks!
> Peter
> 


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

2001-06-19 Thread Attila Strauss

Hi,


> What the true advantage of using templates 
Abstraction between PHP and HTML.

>where can I get info on using them?
have a look at the well-known php sites like:

http://www.phpbuilder.com/
http://www.phpdeveloper.org/
http://www.newbienetwork.net/
http://www.evilwalrus.com/






[PHP] pipe an email

2001-05-22 Thread Attila Strauss

hi all,

could someone help me with this prob ...
i wanna pipe an emails' sender, subject and body ...  ( mailalias -->
programm(script) )
any ideas how this could be done the *best* way?


#!/usr/local/bin/php -q



regards
attila


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