php-general Digest 17 Nov 2007 09:54:26 -0000 Issue 5133

2007-11-17 Thread php-general-digest-help

php-general Digest 17 Nov 2007 09:54:26 - Issue 5133

Topics (messages 264727 through 264738):

Re: Loop issues
264727 by: Jim Lucas
264728 by: Jim Lucas

Re: Open Source BTS?? -- Roach
264729 by: Daevid Vincent
264732 by: David Calkins

Re: Open Source BTS??
264730 by: Daevid Vincent

Re: IDE
264731 by: Larry Garfield

Re: PHP editor
264733 by: Cem Kayali
264734 by: Cem Kayali
264735 by: Cem Kayali

Re: [NEWBIE GUIDE] For the benefit of new members
264736 by: Andrew Ballard
264738 by: Cem Kayali

bank query and curl
264737 by: Ronald Wiplinger

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]


--
---BeginMessage---

Dan Shirah wrote:

Hello all,

I am having trouble trying to figure out how I should compose this loop to
give me ALL the results I want.

Below are my queries.  I am querying two different databases to pull in
records that match the requested $id. I am then putting the result into a
$variable and also counting the number of rows returned. These queries work
just fine and pull in all of the data that I want...and by viewing the
print_r() I have verified that all the information was returned.

?php
$get_cs = SELECT DISTINCT
  request_type, card_id, first_name, last_name
   FROM
 support_payment_request
   WHERE
 card_id = '$id';
$cs_type = mssql_query($get_cs) or die(mssql_get_last_message());
$cs_num = mssql_num_rows($cs_type);

if($cs_num  0) {
   while ($cs_row = mssql_fetch_array($cs_type)) {
$cs_type2 = $cs_row['request_type'];
$cs_first = $cs_row['first_name'];
$cs_last = $cs_row['last_name'];
$cs_name = $cs_first. .$cs_last;
 print_r ($cs_row);
}
   }
$get_tr = SELECT DISTINCT
  request_type, card_id, first_name, last_name
   FROM
 payment_request
   WHERE
 card_id = '$id';
$tr_type = mssql_query($get_tr) or die(mssql_get_last_message());
$tr_num = mssql_num_rows($tr_type);

if($tr_num  0) {
   while ($tr_row = mssql_fetch_array($tr_type)) {
$tr_type2 = $tr_row['request_type'];
$tr_first = $tr_row['first_name'];
$tr_last = $tr_row['last_name'];
$tr_name = $tr_first. .$tr_last;
 print_r ($tr_row);
}
   }
$num_total = $cs_num + $tr_num;
$multiple = MULTIPLE;
?

Here is where I am running into problems. First I am writing an if ()
statement to see if there were any rows returned from the queries.  If a row
was returned I am echoing out the data that was assigned to the different
variables above.  This works...kind of...

 td width='89' height='13' align='center' class='tblcell'div
align='center'?php echo a href='javascript:editRecord($id)'$id/a;
?/div/td
td width='172' height='13' align='center' class='tblcell'div
align='center'?php if ($cs_num  0) { echo $cs_namebr /\n; }
  if ($tr_num  0) { echo $tr_namebr /\n;
} ?/div/td
td width='201' height='13' align='center' class='tblcell'div
align='center'?php echo $dateTime; ?/div/td
td width='158' height='13' align='center' class='tblcell'div
align='center'?php if ($num_total  1) { echo $multiple; }
  if ($num_total == 1  $cs_num == 1) { echo $cs_type2;
}
  if ($num_total == 1  $tr_num == 1) { echo $tr_type2;
} ?/div/td
td width='160' height='13' align='center' class='tblcell'div
align='center'?php echo $last_processed_by; ?/div/td

If a single row was returned by the query, all of the information echos out
just fine.  BUT, If one of the queries returned more than one row, the
information that is echo'd out is only the LAST row's information. For
example, the result of my $cs_type query returns 3 names: John Smith, Jane
Smith, James Smith.  The only information being populated to my table is
James Smith.  Because of this I think I need to put a loop where the echo
$cs_namebr /\n; is so it will loop through all of the returned names and
show them all.  I have tried a for, foreach and while loop but I just can't
seem to wrap my fingers around the right way to use it.

Any help is appreciated.

Thanks,
Dan


What about something like this?

?php

$records = array();

$SQL = SELECT DISTINCT request_type,
card_id,
first_name,
last_name
FROMsupport_payment_request
WHERE   card_id = '$id';

$cs_type = mssql_query($SQL) or die(mssql_get_last_message());

if ( $cs_type ) {
while ($records[] = $record = mssql_fetch_array($cs_type)) {
print_r ($record);
}
}

$SQL = SELECT DISTINCT request_type,
card_id,
first_name,
last_name
FROMpayment_request
WHERE   card_id = '$id';
$tr_type = 

php-general Digest 17 Nov 2007 23:15:33 -0000 Issue 5134

2007-11-17 Thread php-general-digest-help

php-general Digest 17 Nov 2007 23:15:33 - 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]


--
---BeginMessage---
tell me :which book is good for newman??---End Message---
---BeginMessage---
On 11/17/07, joychen [EMAIL PROTECTED] wrote:

 tell me :which book is good for newman??


You mean paul?
---End Message---
---BeginMessage---
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---
---BeginMessage---
I tried to understand htmlentities by putting this code into a test.php:

?php
if(!$page) {
?
H3Test 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=$field1br;
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo field2=$field2p;
echo htmlentities($field1,ENT_QUOTES,UTF-8);

echo p;
$str = A 'quote' is bbold/b;

// Outputs: A 'quote' is lt;bgt;boldlt;/bgt;
echo htmlentities($str);
echo br;
// Outputs: A #039;quote#039; is lt;bgt;boldlt;/bgt;
echo htmlentities($str, ENT_QUOTES);

}
?



The output on the screen is:

field1=*Greater input and lower input*
field2=bGreater input and lower input/b

bGreater input and lower input/b

A 'quote' is bbold/b
A 'quote' is bbold/b


I expected that it would give me in the second line:
field2=lt;bgt;Greater input and lower inputlt;/bgt;

and the lower two lines I expected as:

A 'quote' is lt;bgt;boldlt;/bgt;
A #039;quote#039; is lt;bgt;boldlt;/bgt;


What do I miss understand here?

bye

Ronald
---End Message---
---BeginMessage---

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=bGreater input and lower input/b

bGreater input and lower input/b

A 'quote' is bbold/b
A 'quote' is bbold/b


I expected that it would give me in the second line:
field2=lt;bgt;Greater input and lower inputlt;/bgt;

and the lower two lines I expected as:

A 'quote' is lt;bgt;boldlt;/bgt;
A #039;quote#039; is lt;bgt;boldlt;/bgt;


What do I miss understand here


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

--
Ludovic André
---End Message---
---BeginMessage---

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) {
?
H3Test 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=$field1br;
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo field2=$field2p;
echo htmlentities($field1,ENT_QUOTES,UTF-8);

echo p;
$str = A 'quote' is bbold/b;

// Outputs: A 'quote' is lt;bgt;boldlt;/bgt;
echo htmlentities($str);
echo br;
// Outputs: A #039;quote#039; is lt;bgt;boldlt;/bgt;
echo htmlentities($str, ENT_QUOTES);

}
?



The output on the screen is:

field1=*Greater input and lower input*
field2=bGreater input and lower input/b

bGreater input and lower input/b

A 'quote' is bbold/b
A 'quote' is bbold/b


I expected that it would give me in the second line:
field2=lt;bgt;Greater input and lower inputlt;/bgt;

and the lower two lines I expected as:

A 'quote' is lt;bgt;boldlt;/bgt;
A #039;quote#039; is lt;bgt;boldlt;/bgt;


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

Ronald Wiplinger wrote:

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

?php
if(!$page) {
?

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:

?php
if(!$page) {
?
H3Test 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=$field1br;
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo field2=$field2p;
echo htmlentities($field1,ENT_QUOTES,UTF-8);

echo p;
$str = A 'quote' is bbold/b;

// Outputs: A 'quote' is lt;bgt;boldlt;/bgt;
echo htmlentities($str);
echo br;
// Outputs: A #039;quote#039; is lt;bgt;boldlt;/bgt;
echo htmlentities($str, ENT_QUOTES);

}
?



The output on the screen is:

field1=*Greater input and lower input*
field2=bGreater input and lower input/b

bGreater input and lower input/b

A 'quote' is bbold/b
A 'quote' is bbold/b


I expected that it would give me in the second line:
field2=lt;bgt;Greater input and lower inputlt;/bgt;

and the lower two lines I expected as:

A 'quote' is lt;bgt;boldlt;/bgt;
A #039;quote#039; is lt;bgt;boldlt;/bgt;


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=bGreater input and lower input/b

bGreater input and lower input/b

A 'quote' is bbold/b
A 'quote' is bbold/b


I expected that it would give me in the second line:
field2=lt;bgt;Greater input and lower inputlt;/bgt;

and the lower two lines I expected as:

A 'quote' is lt;bgt;boldlt;/bgt;
A #039;quote#039; is lt;bgt;boldlt;/bgt;


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:


?php
if(!$page) {
?
H3Test 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=$field1br;
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo field2=$field2p;
echo htmlentities($field1,ENT_QUOTES,UTF-8);

echo p;
$str = A 'quote' is bbold/b;

// Outputs: A 'quote' is lt;bgt;boldlt;/bgt;
echo htmlentities($str);
echo br;
// Outputs: A #039;quote#039; is lt;bgt;boldlt;/bgt;
echo htmlentities($str, ENT_QUOTES);

}
?



The output on the screen is:

field1=*Greater input and lower input*
field2=bGreater input and lower input/b

bGreater input and lower input/b

A 'quote' is bbold/b
A 'quote' is bbold/b


I expected that it would give me in the second line:
field2=lt;bgt;Greater input and lower inputlt;/bgt;

and the lower two lines I expected as:

A 'quote' is lt;bgt;boldlt;/bgt;
A #039;quote#039; is lt;bgt;boldlt;/bgt;


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:

?php
if(!$page) {
?
H3Test 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=$field1br;
$field2=htmlentities($field1,ENT_QUOTES,UTF-8);
echo field2=$field2p;


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 bbold/b;

// Outputs: A 'quote' is lt;bgt;boldlt;/bgt;
echo htmlentities($str);
echo br;
// Outputs: A #039;quote#039; is lt;bgt;boldlt;/bgt;
echo htmlentities($str, ENT_QUOTES);

}
?



The output on the screen is:

field1=*Greater input and lower input*
field2=bGreater input and lower input/b

bGreater input and lower input/b

A 'quote' is bbold/b
A 'quote' is bbold/b


I expected that it would give me in the second line:
field2=lt;bgt;Greater input and lower inputlt;/bgt;

and the lower two lines I expected as:

A 'quote' is lt;bgt;boldlt;/bgt;
A #039;quote#039; is lt;bgt;boldlt;/bgt;


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?

LocationMatch ^/(.*)track
   php_value include_path .:/libraries/$1/php/lib
   SetEnv PERL5LIB /libaries/$1/perl/lib
 /LocationMatch

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
Guidehttp://www.amazon.com/architects-Zend-Certification-Study-Guide/dp/0973862149

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?