php-general Digest 17 Nov 2007 23:15:33 -0000 Issue 5134
Topics (messages 264739 through 264755):
tell me :which book is good for newman??
264739 by: joychen
264742 by: David Giragosian
264743 by: Dave Goodchild
htmlentities()
264740 by: Ronald Wiplinger
264741 by: Ludovic André
264749 by: Casey
264750 by: Jim Lucas
Looking for a navigation recommendation
264744 by: Jon Westcot
264745 by: tedd
264746 by: Jon Westcot
264751 by: tedd
264754 by: Richard Heyes
Re: installing PHP 5.3 on MAC with mysqlnd support
264747 by: Gergely Hodicska
264748 by: Gergely Hodicska
Dynamic include path setting?
264752 by: Hayden Livingston
Re: bank query and curl
264753 by: admin.buskirkgraphics.com
264755 by: Stut
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
tell me :which book is good for newman??
--- End Message ---
--- Begin Message ---
On 11/17/07, joychen <[EMAIL PROTECTED]> wrote:
>
> tell me :which book is good for newman??
You mean paul?
--- End Message ---
--- Begin Message ---
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?
>
--- End Message ---
--- Begin Message ---
I tried to understand htmlentities by putting this code into a test.php:
<?php
if(!$page) {
?>
<H3>Test of evil input</H3>
<form method="post" action="<?php echo $PHP_SELF?>">
<INPUT type="text" name="field1" size="100" maxlength="100">
<INPUT type="hidden" name="page" value="1">
<INPUT type="submit" name="submit" value="Check it!">
</form>
<?php
}
else
{
echo "field1=$field1<br>";
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo "field2=$field2<p>";
echo htmlentities($field1,ENT_QUOTES,UTF-8);
echo "<p>";
$str = "A 'quote' is <b>bold</b>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str);
echo "<br>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str, ENT_QUOTES);
}
?>
The output on the screen is:
field1=*Greater input and lower input*
field2=<b>Greater input and lower input</b>
<b>Greater input and lower input</b>
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
I expected that it would give me in the second line:
field2=<b>Greater input and lower input</b>
and the lower two lines I expected as:
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
What do I miss understand here?
bye
Ronald
--- End Message ---
--- Begin Message ---
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=<b>Greater input and lower input</b>
<b>Greater input and lower input</b>
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
I expected that it would give me in the second line:
field2=<b>Greater input and lower input</b>
and the lower two lines I expected as:
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
What do I miss understand here
did you try to 'view-source' the page ?
--
Ludovic André
--- End Message ---
--- Begin Message ---
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:
<?php
if(!$page) {
?>
<H3>Test of evil input</H3>
<form method="post" action="<?php echo $PHP_SELF?>">
<INPUT type="text" name="field1" size="100" maxlength="100">
<INPUT type="hidden" name="page" value="1">
<INPUT type="submit" name="submit" value="Check it!">
</form>
<?php
}
else
{
echo "field1=$field1<br>";
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo "field2=$field2<p>";
echo htmlentities($field1,ENT_QUOTES,UTF-8);
echo "<p>";
$str = "A 'quote' is <b>bold</b>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str);
echo "<br>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str, ENT_QUOTES);
}
?>
The output on the screen is:
field1=*Greater input and lower input*
field2=<b>Greater input and lower input</b>
<b>Greater input and lower input</b>
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
I expected that it would give me in the second line:
field2=<b>Greater input and lower input</b>
and the lower two lines I expected as:
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
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
--- End Message ---
--- Begin Message ---
Ronald Wiplinger wrote:
I tried to understand htmlentities by putting this code into a test.php:
<?php
if(!$page) {
?>
<H3>Test of evil input</H3>
<form method="post" action="<?php echo $PHP_SELF?>">
<INPUT type="text" name="field1" size="100" maxlength="100">
<INPUT type="hidden" name="page" value="1">
<INPUT type="submit" name="submit" value="Check it!">
</form>
<?php
}
else
{
echo "field1=$field1<br>";
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo "field2=$field2<p>";
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 "<p>";
$str = "A 'quote' is <b>bold</b>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str);
echo "<br>";
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities($str, ENT_QUOTES);
}
?>
The output on the screen is:
field1=*Greater input and lower input*
field2=<b>Greater input and lower input</b>
<b>Greater input and lower input</b>
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
I expected that it would give me in the second line:
field2=<b>Greater input and lower input</b>
and the lower two lines I expected as:
A 'quote' is <b>bold</b>
A 'quote' is <b>bold</b>
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
Hi!
http://www.phpmac.com/
This project seems dead.
Best Regards,
Felhő
--- End Message ---
--- Begin Message ---
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ő
--- End Message ---
--- Begin Message ---
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?
<LocationMatch "^/(.*)track">
php_value include_path .:/libraries/$1/php/lib
SetEnv PERL5LIB /libaries/$1/perl/lib
</LocationMatch>
Thanks,
HL
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
[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/
--- End Message ---