Re: [PHP] [NEWBIE GUIDE] For the benefit of new members

2007-11-17 Thread Cem Kayali




Peter Ford-4 wrote:
> 
>> 
>> I was all ready to jump on Point #6 to disagree until I read the
>> next paragraph, updating that with the correct information.  PHP can
>> find out the OS of the system on which the browser is running.
>> 
> 
> Strictly speaking, PHP can only find out what the browser tells it - that
> includes the OS. I could quite easily hack the browser info string sent by
> (at
> least one of) my browsers to pretend I was using some horrible Windows
> rubbish...
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


That's true... if you use ie; konquerer, and adjust settings as "send no
identification", then php script has nothing to determine browser type, OS
etc. etc. The other way to hide identification + ip address is to use proxy
servers, which is very common nowadays.

Regards,






-
  
  
  


Cem Kayalı

-- 
View this message in context: 
http://www.nabble.com/-NEWBIE-GUIDE--For-the-benefit-of-new-members-tf4817245.html#a13807542
Sent from the PHP - General mailing list archive at Nabble.com.


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



[PHP] tell me :which book is good for newman??

2007-11-17 Thread joychen
tell me :which book is good for newman??

[PHP] htmlentities()

2007-11-17 Thread Ronald Wiplinger
I tried to understand htmlentities by putting this code into a test.php:


Test of evil input








";
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo "field2=$field2";
echo htmlentities($field1,ENT_QUOTES,UTF-8);

echo "";
$str = "A 'quote' is bold";

// Outputs: A 'quote' is bold
echo htmlentities($str);
echo "";
// Outputs: A 'quote' is bold
echo htmlentities($str, ENT_QUOTES);

}
?>



The output on the screen is:

field1=*Greater input and lower input*
field2=Greater input and lower input

Greater input and lower input

A 'quote' is bold
A 'quote' is bold


I expected that it would give me in the second line:
field2=Greater input and lower input

and the lower two lines I expected as:

A 'quote' is bold
A 'quote' is bold


What do I miss understand here?

bye

Ronald

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



Re: [PHP] htmlentities()

2007-11-17 Thread Ludovic André

Hi,

I tried to understand htmlentities by putting this code into a test.php:

[...]

The output on the screen is:

field1=*Greater input and lower input*
field2=Greater input and lower input

Greater input and lower input

A 'quote' is bold
A 'quote' is bold


I expected that it would give me in the second line:
field2=Greater input and lower input

and the lower two lines I expected as:

A 'quote' is bold
A 'quote' is bold


What do I miss understand here


did you try to 'view-source' the page ?

--
Ludovic André

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



Re: [PHP] tell me :which book is good for newman??

2007-11-17 Thread David Giragosian
On 11/17/07, joychen <[EMAIL PROTECTED]> wrote:
>
> tell me :which book is good for newman??


You mean paul?


[PHP] Looking for a navigation recommendation

2007-11-17 Thread Jon Westcot
Hi all:

I'm working on a project wherein I need to be able to navigate to previous 
and next sections of data.  I'm wondering what the best way to code for this 
would be.

When I enter the page, I'd like it to use something in the MySQL SELECT 
such as "LIMIT 0,25", but the "0" portion needs to change with the appropriate 
selections of "Next" or "Prev".  I thought that setting Next or Prev as an 
anchor back to the same page would let me pass along data, but it doesn't seem 
to be happening, at least, not in the $_POST variables.

Any suggestions for me?  Or maybe a recommendation for a similar page I 
could view and learn from?

Thanks so much for any help you can send my way.

Jon


Re: [PHP] tell me :which book is good for newman??

2007-11-17 Thread Dave Goodchild
Start with Programming PHP and then get Upgrading To PHP5 (both by O'Reilly)

On Nov 17, 2007 2:31 PM, David Giragosian <[EMAIL PROTECTED]> wrote:
> On 11/17/07, joychen <[EMAIL PROTECTED]> wrote:
> >
> > tell me :which book is good for newman??
>
>
> You mean paul?
>

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



Re: [PHP] Looking for a navigation recommendation

2007-11-17 Thread tedd

At 7:55 AM -0700 11/17/07, Jon Westcot wrote:

Hi all:

I'm working on a project wherein I need to be able to navigate 
to previous and next sections of data.  I'm wondering what the best 
way to code for this would be.


When I enter the page, I'd like it to use something in the MySQL 
SELECT such as "LIMIT 0,25", but the "0" portion needs to change 
with the appropriate selections of "Next" or "Prev".  I thought that 
setting Next or Prev as an anchor back to the same page would let me 
pass along data, but it doesn't seem to be happening, at least, not 
in the $_POST variables.


Any suggestions for me?  Or maybe a recommendation for a similar 
page I could view and learn from?


Thanks so much for any help you can send my way.

Jon


Jon:

Do you mean something like this:

http://webbytedd.com/bbb/proof

Please note the page thing at the bottom. If so, I'll work up a demo for you.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] Looking for a navigation recommendation

2007-11-17 Thread Jon Westcot
Hi Tedd:

> >Hi all:
> >
> > I'm working on a project wherein I need to be able to navigate
> >to previous and next sections of data.  I'm wondering what the best
> >way to code for this would be.
> >
> > When I enter the page, I'd like it to use something in the MySQL
> >SELECT such as "LIMIT 0,25", but the "0" portion needs to change
> >with the appropriate selections of "Next" or "Prev".  I thought that
> >setting Next or Prev as an anchor back to the same page would let me
> >pass along data, but it doesn't seem to be happening, at least, not
> >in the $_POST variables.
> >
> > Any suggestions for me?  Or maybe a recommendation for a similar
> >page I could view and learn from?
> >
> > Thanks so much for any help you can send my way.
> >
> > Jon
>
> Jon:
>
> Do you mean something like this:
>
> http://webbytedd.com/bbb/proof
>
> Please note the page thing at the bottom. If so, I'll work up a demo for
you.
>
> Cheers,
>
> tedd

YES!  Exactly!  Something like that would be very nice to have.

MUCH appreciated!

Jon

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



Re: [PHP] installing PHP 5.3 on MAC with mysqlnd support

2007-11-17 Thread Gergely Hodicska

Hi!



http://www.phpmac.com/

This project seems dead.


Best Regards,
Felhő

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



Re: [PHP] installing PHP 5.3 on MAC with mysqlnd support

2007-11-17 Thread Gergely Hodicska

Hi!



Consider using Macports (http://www.macports.org/) to install it. After
installing macports onto your computer, do this in the terminal:

I ma using Macports, but it currently doesn't support PHP 5.3.


// This will give you the available variants (I think)

port info php5

To list package variants:
#> port variants php5


Best Regards,
Felhő

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



Re: [PHP] htmlentities()

2007-11-17 Thread Casey

It is doing that ;)

If you look at the source, you will see the expected output.



On Nov 17, 2007, at 4:41 AM, Ronald Wiplinger <[EMAIL PROTECTED]> wrote:

I tried to understand htmlentities by putting this code into a  
test.php:



Test of evil input








";
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo "field2=$field2";
echo htmlentities($field1,ENT_QUOTES,UTF-8);

echo "";
$str = "A 'quote' is bold";

// Outputs: A 'quote' is bold
echo htmlentities($str);
echo "";
// Outputs: A 'quote' is bold
echo htmlentities($str, ENT_QUOTES);

}
?>



The output on the screen is:

field1=*Greater input and lower input*
field2=Greater input and lower input

Greater input and lower input

A 'quote' is bold
A 'quote' is bold


I expected that it would give me in the second line:
field2=Greater input and lower input

and the lower two lines I expected as:

A 'quote' is bold
A 'quote' is bold


What do I miss understand here?

bye

Ronald

--
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] htmlentities()

2007-11-17 Thread Jim Lucas

Ronald Wiplinger wrote:

I tried to understand htmlentities by putting this code into a test.php:


Test of evil input








";
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo "field2=$field2";


you are echo'ing the same field1 variable as before.
by your comments at the bottom of what you expected the output
to be, I think you are wanting to use the $field2 variable instead.

echo htmlentities($field1,ENT_QUOTES,UTF-8);

echo "";
$str = "A 'quote' is bold";

// Outputs: A 'quote' is bold
echo htmlentities($str);
echo "";
// Outputs: A 'quote' is bold
echo htmlentities($str, ENT_QUOTES);

}
?>



The output on the screen is:

field1=*Greater input and lower input*
field2=Greater input and lower input

Greater input and lower input

A 'quote' is bold
A 'quote' is bold


I expected that it would give me in the second line:
field2=Greater input and lower input

and the lower two lines I expected as:

A 'quote' is bold
A 'quote' is bold


are you viewing this in the html source or in the browser window?




What do I miss understand here?

bye

Ronald




--
Jim Lucas


"Perseverance is not a long race;
it is many short races one after the other"

Walter Elliot



"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
by William Shakespeare

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



Re: [PHP] Looking for a navigation recommendation

2007-11-17 Thread tedd

At 8:15 AM -0700 11/17/07, Jon Westcot wrote:



YES!  Exactly!  Something like that would be very nice to have.

MUCH appreciated!

Jon


Jon:

Here it is:

http://webbytedd.com/bbb/paging

I'm assuming that you know how to establish communication with your 
database; how to set up your database; and how to use css and the 
images as shown there.


If you get in trouble, I'm available for hire. :-)

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



[PHP] Dynamic include path setting?

2007-11-17 Thread Hayden Livingston
Hello,

I was wondering if this is possible? It seems in the apache mailing
list, that it is not possible per se, but any workaround thoughts?


   php_value include_path .:/libraries/$1/php/lib
   SetEnv PERL5LIB /libaries/$1/perl/lib
 

Thanks,
HL

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



RE: [PHP] bank query and curl

2007-11-17 Thread admin
WHY! Would you even want to pull that data first off? 
It would be out dated as of the next transaction anyway.
Secondly if you can curl the data from the server, and get your account
information! I suggest you change banks.

Bad decision I think to make this attempt. 

You can bet I will be watching your networks for an attempt on
authentication failures.
Because that request does not sound RIGHT to me.

inetnum: 59.124.0.0 - 59.127.255.255
netname: HINET-NET
country: TW
descr: CHTD, Chunghwa Telecom Co.,Ltd.
descr: Data-Bldg.6F, No.21, Sec.21, Hsin-Yi Rd.
descr: Taipei Taiwan 100


Interland, Inc. MAXIM-NETBLK-1 (NET-216-65-0-0-1) 
216.65.0.0 - 216.65.127.255
Poke Internet Services MAX-CUSTNET-348 (NET-216-65-86-0-1) 
216.65.86.0 - 216.65.86.255



-Original Message-
From: Ronald Wiplinger [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 16, 2007 11:38 PM
To: PHP General list
Subject: [PHP] bank query and curl

I have a bank account and would like to query the last transactions.

I can do that now via web and think that I can convert this procedure to
a list of curl requests and finally put the result into a database on my
server.
Fortunately this bank account does not allow transactions, just viewing
the account.

Is there a guide available how to start this project?

bye

Ronald

-- 
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] Looking for a navigation recommendation

2007-11-17 Thread Richard Heyes

I'm working on a project wherein I need to be able to navigate to previous and 
next

> sections of data.  I'm wondering what the best way to code for this

would be.

When I enter the page, I'd like it to use something in the MySQL SELECT such as

>

"LIMIT 0,25", but the "0" portion needs to change with the appropriate 
selections of
"Next" or "Prev".  I thought that setting Next or Prev as an anchor back to the 
same page
would let me pass along data, but it doesn't seem to be happening, at least, 
not in
the $_POST variables.

Any suggestions for me?  Or maybe a recommendation for a similar page I could 
view and

> learn from?

The PEAR Pager class can do this for you. Together with the 
Pager_Sliding package it works very well.


http://pear.php.net/package/Pager

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

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



Re: [PHP] bank query and curl

2007-11-17 Thread Stut

[EMAIL PROTECTED] wrote:
WHY! Would you even want to pull that data first off? 
It would be out dated as of the next transaction anyway.

Secondly if you can curl the data from the server, and get your account
information! I suggest you change banks.


With that attitude you'll end up keeping your money under your bed. 
Anything my browser can do curl can do.


Bad decision I think to make this attempt. 


Why? If Ronald decides to access *his* account using a method other than 
a browser, what is he doing wrong? The only downside to it is if he's 
storing his authentication credentials somewhere so it can be an 
automated process. Aside from that possibility I don't see the bad here.



You can bet I will be watching your networks for an attempt on
authentication failures.
Because that request does not sound RIGHT to me.

inetnum: 59.124.0.0 - 59.127.255.255
netname: HINET-NET
country: TW
descr: CHTD, Chunghwa Telecom Co.,Ltd.
descr: Data-Bldg.6F, No.21, Sec.21, Hsin-Yi Rd.
descr: Taipei Taiwan 100


Interland, Inc. MAXIM-NETBLK-1 (NET-216-65-0-0-1) 
216.65.0.0 - 216.65.127.255
Poke Internet Services MAX-CUSTNET-348 (NET-216-65-86-0-1) 
216.65.86.0 - 216.65.86.255


Wow. Look everyone, he knows how to look up the owner of an IP address. 
Phear his mad sysadmin skillz!


Seriously, I highly doubt Ronald is going to try anything against your 
systems. Just curious about something... what would you do if he did try 
something? Call your mother and have a little cry?



-Original Message-
From: Ronald Wiplinger [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 16, 2007 11:38 PM

To: PHP General list
Subject: [PHP] bank query and curl

I have a bank account and would like to query the last transactions.

I can do that now via web and think that I can convert this procedure to
a list of curl requests and finally put the result into a database on my
server.
Fortunately this bank account does not allow transactions, just viewing
the account.

Is there a guide available how to start this project?


I would suggest the curl documentation. In order to duplicate what a 
browser does you basically just need to make sure you persist cookies 
between requests. Depending on what the site you're accessing does it 
may not be particularly trivial to do this. You may end up needing to 
parse each page that's returned to get the right URL to use for the next 
request, but it shouldn't get any more complicated than that.


As I mentioned above I would strongly recommend that you do not store 
your authentication credentials anywhere. If you need this to be an 
automated system don't bother - it's not worth the risk.


Oh, and don't underestimate the damage that can be caused by someone 
gaining access to this account. Just because you can't carry out 
transactions through the site doesn't mean the information it gives you 
access to can't be used for evil purposes.


One last thing... you may find yourself getting blocked from the banks 
site if you make too many failed requests. You may want to pick another 
site while you learn how curl works.


-Stut

--
http://stut.net/

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



Re: [PHP] Looking for a navigation recommendation (SOLVED)

2007-11-17 Thread Jon Westcot
Hi Tedd:

> > YES!  Exactly!  Something like that would be very nice to have.
> >
> > MUCH appreciated!
> >
> > Jon
>
> Jon:
>
> Here it is:
>
> http://webbytedd.com/bbb/paging
>
> I'm assuming that you know how to establish communication with your
> database; how to set up your database; and how to use css and the
> images as shown there.
>
> If you get in trouble, I'm available for hire. :-)
>
> tedd

Thanks for the code sample.  It pointed me in exactly the right
direction to solve what I was trying to accomplish.

Appreciatively,

Jon

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



Re: [PHP] tell me :which book is good for newman??

2007-11-17 Thread joychen
thank you ,i will buy them!
""Dave Goodchild"" <[EMAIL PROTECTED]>  news:[EMAIL PROTECTED]
> Start with Programming PHP and then get Upgrading To PHP5 (both by O'Reilly)
> 
> On Nov 17, 2007 2:31 PM, David Giragosian <[EMAIL PROTECTED]> wrote:
>> On 11/17/07, joychen <[EMAIL PROTECTED]> wrote:
>> >
>> > tell me :which book is good for newman??
>>
>>
>> You mean paul?
>>
>

Re: [PHP] bank query and curl

2007-11-17 Thread Ronald Wiplinger
Stut wrote:
> [EMAIL PROTECTED] wrote:
>> WHY! Would you even want to pull that data first off? It would be out
>> dated as of the next transaction anyway.
>> Secondly if you can curl the data from the server, and get your account
>> information! I suggest you change banks.

Could it be that I try to use if a customer has paid?
WHY would that be wrong?

>
> With that attitude you'll end up keeping your money under your bed.
> Anything my browser can do curl can do.
>
>> Bad decision I think to make this attempt. 
>
> Why? If Ronald decides to access *his* account using a method other
> than a browser, what is he doing wrong? The only downside to it is if
> he's storing his authentication credentials somewhere so it can be an
> automated process. Aside from that possibility I don't see the bad here.
>
>> You can bet I will be watching your networks for an attempt on
>> authentication failures.
>> Because that request does not sound RIGHT to me.
>>
>> inetnum: 59.124.0.0 - 59.127.255.255
>> netname: HINET-NET
>> country: TW
>> descr: CHTD, Chunghwa Telecom Co.,Ltd.
>> descr: Data-Bldg.6F, No.21, Sec.21, Hsin-Yi Rd.
>> descr: Taipei Taiwan 100
>>
>>
>> Interland, Inc. MAXIM-NETBLK-1 (NET-216-65-0-0-1) 216.65.0.0 -
>> 216.65.127.255
>> Poke Internet Services MAX-CUSTNET-348 (NET-216-65-86-0-1)
>> 216.65.86.0 - 216.65.86.255
>

NOW THAT is a strong word.

Are  you really a sysadmin? or are you just a worker in an IT firm?
Have you signed a contract? or are you anyway just the cleaner there?

I am not sure what are you trying to do here.
Is this a list about php?

It seems to me that you are from the http://veryevil.org site?
How many systems have you already hacked?
How many systems have you already damaged?
Are you proud of that?

Go to my website (easy to find it out which one, right?) There you will
find the bank account number and the bank name.
Good Luck! I wish you a happy jail term!!!


NO answer please. PLEASE no answer!
Please go back to your room and think at least ten times what you
actually told us now about yourself!

> Wow. Look everyone, he knows how to look up the owner of an IP
> address. Phear his mad sysadmin skillz!
>
> Seriously, I highly doubt Ronald is going to try anything against your
> systems. Just curious about something... what would you do if he did
> try something? Call your mother and have a little cry?
>
>> -Original Message-
>> From: Ronald Wiplinger [mailto:[EMAIL PROTECTED] Sent: Friday,
>> November 16, 2007 11:38 PM
>> To: PHP General list
>> Subject: [PHP] bank query and curl
>>
>> I have a bank account and would like to query the last transactions.
>>
>> I can do that now via web and think that I can convert this procedure to
>> a list of curl requests and finally put the result into a database on my
>> server.
>> Fortunately this bank account does not allow transactions, just viewing
>> the account.
>>
>> Is there a guide available how to start this project?
>
> I would suggest the curl documentation. In order to duplicate what a
> browser does you basically just need to make sure you persist cookies
> between requests. Depending on what the site you're accessing does it
> may not be particularly trivial to do this. You may end up needing to
> parse each page that's returned to get the right URL to use for the
> next request, but it shouldn't get any more complicated than that.
>
I found in the meantime some code to play with. I also found a tutorial
I followed, but it was only to pull some web sites.
The challenge is to select so many things on the following pages.
> As I mentioned above I would strongly recommend that you do not store
> your authentication credentials anywhere. If you need this to be an
> automated system don't bother - it's not worth the risk.

That is the point I do not understand. Where is the risk? The bank
information is stored on the customers web site anyway, in order that
their user can pay. The only thing what is not there is the login
information.
I believe if we can use the out of the path credentials like we access
the sql server it should be same secure.

The bank does not allow transactions, it is only for viewing the last
100 days transactions.

>
> Oh, and don't underestimate the damage that can be caused by someone
> gaining access to this account. Just because you can't carry out
> transactions through the site doesn't mean the information it gives
> you access to can't be used for evil purposes.
>
> One last thing... you may find yourself getting blocked from the banks
> site if you make too many failed requests. You may want to pick
> another site while you learn how curl works.
>
Well, I will not try more than 3 times in a row with curl and than with
the browser. Thanks for the hint though.

bye

Ronald

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



Re: [PHP] tell me :which book is good for newman??

2007-11-17 Thread Nathan Nobbe
php|architect's Zend PHP 5 Certification Study
Guide

is solid; even for people whove programmed in php for a little while.
i learned a few things in there.
its a great starting point; and not too long either.

-nathan

On Nov 17, 2007 8:34 PM, joychen <[EMAIL PROTECTED]> wrote:

> thank you ,i will buy them!
> ""Dave Goodchild"" <[EMAIL PROTECTED]> 
> news:[EMAIL PROTECTED]
> > Start with Programming PHP and then get Upgrading To PHP5 (both by
> O'Reilly)
> >
> > On Nov 17, 2007 2:31 PM, David Giragosian <[EMAIL PROTECTED]> wrote:
> >> On 11/17/07, joychen <[EMAIL PROTECTED]> wrote:
> >> >
> >> > tell me :which book is good for newman??
> >>
> >>
> >> You mean paul?
> >>
> >
>