php-general Digest 18 Nov 2007 23:31:30 -0000 Issue 5135

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

php-general Digest 18 Nov 2007 23:31:30 - Issue 5135

Topics (messages 264756 through 264761):

Re: Looking for a navigation recommendation (SOLVED)
264756 by: Jon Westcot

Re: tell me :which book is good for newman??
264757 by: joychen
264759 by: Nathan Nobbe

Re: bank query and curl
264758 by: Ronald Wiplinger
264760 by: Per Jessen

Re: Dynamic include path setting?
264761 by: Chris

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---
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
---End Message---
---BeginMessage---
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?

---End Message---
---BeginMessage---
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?
 
 

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

Re: [PHP] bank query and curl

2007-11-18 Thread Per Jessen
Ronald Wiplinger wrote:

 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?

That would be perfectly alright - in fact, my bank offers a transaction
list for download for just that purpose. 


/Per Jessen, Zürich

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



Re: [PHP] Dynamic include path setting?

2007-11-18 Thread Chris

Hayden Livingston wrote:

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?


If they say it's not possible I don't think you're going to get a 
different answer here.



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


in your init.php or common.php or whatever:

// include the existing 'include_path' and then add this folder on to 
the end.
ini_set('include_path', ini_get('include_path') . 
':/path/to/your/base/folder');



To get your current dir:

$my_directory = dirname(__FILE__);

and adjust that.

--
Postgresql  php tutorials
http://www.designmagick.com/

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



Re: [PHP] submitting forms with ajax

2007-11-18 Thread samantha_o

I did not try using json becausse i am very knew in this field and dont know
much bout it. Can you give me some examples about it? Thanks for helping.


Shiplu wrote:
 
 Why dont you use json as server response? Then manipulate it by own
 javascript. You can use jquery $.getJSON function to do the ajax part
 for you.
 
 On 11/16/07, Shiplu [EMAIL PROTECTED] wrote:
 Why dont you use json as server response? Then manipulate it by own
 javascript. You can use jquery $.getJSON function to do the ajax part
 for you.

 On 11/16/07, samantha_o [EMAIL PROTECTED] wrote:
 
  Hi,
 
  i would like to submit forms with ajax, using jquery and then load the
 next
  page. I had successfully do it with jquery and form plugin. however, it
 does
  not work whenever the server response consist of both HTMLs and
 javascript
  together. Is it possible to make it works? I am new in all this. Can
 anyone
  help me?
  --
  View this message in context:
 
 http://www.nabble.com/submitting-forms-with-ajax-tf4819530.html#a13788322
  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 General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/submitting-forms-with-ajax-tf4819530.html#a13826338
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



Re: [PHP] submitting forms with ajax

2007-11-18 Thread Nathan Nobbe
json is just a terse way to create objects anonymously as well as other data
structures in javascript.
http://json.org/

to build a json response with html
essentially all you need to do is create a javascript array in php and put
the html
you want for the next page in that.  then you use the eval() function in
javascript
to 'incarnate' the javascript array (which contains the html).  once youve
done that
you can put the html into the dom wherever you like.  typically you will
replace some
existing dom content w/ the new html.

so as an example; lets say on the php side of things you have your html; for
the sake
of brevity lets assume its in a variable called *$html*.  you will need to
encode this for
transmission (so the javascript interpreter doesnt blow up when it tries to
'incarnate' the
string as literal javascript code).  if youre using php5 this is as simple
as

$jsonResponse = json_encode(utf8_encode('var newHtml = [' . $html . ']'));

notice the braces on either side of the html; here were creating a
javascript array containing
our html string.  if you have multiple html segments youd like to stitch
into different parts of the
dom, simply delimit them with commas, such as

$jsonResponse = json_encode(utf8_encode('var newHtml = [' . $html . ', ' .
$html1 . ', ' . $html2 . ']'));
and so on.

then you will send that to the browser, where your ajax handler will
intercept it.
echo $jsonReponse;

on the javascript side all you need to do is run this output from the php
through the javascript interpreter.
jquery will hand you back the results packed up somehow, you will have to
read up on how it will hand this
to you (its an XMLHttpRequest object under the hood); but lets say its in a
variable, *responseText*.
the javascript to incarnate your string is:

eval('('+responseText+')');

now all the strings of html you put in the array on the server side are
available to your javascript as indexes of
the *newHtml* array.

so lets say you have a section of the dom in a div tag, with id, *
dynamicContentSection*; using traditional dhtml
techniques you would do something like this to get your new html in place

document.getElementById('dynamicContentSection').innerHtml = newHtml[0];

thats about it.  there are plenty of places to make mistakes though :)
and there alternatives to the methods ive suggested, of course.

take a look a firebug (firefox plugin) and jslint (javascript syntax
checker)
theyre great javascript debugging tools.

-nathan


On Nov 18, 2007 8:25 PM, samantha_o [EMAIL PROTECTED] wrote:


 I did not try using json because i am very new in this field and dont know
 much about it. Can you give me some examples about it? Thanks for helping.


 Shiplu wrote:
 
  Why dont you use json as server response? Then manipulate it by own
  javascript. You can use jquery $.getJSON function to do the ajax part
  for you.
 
  On 11/16/07, Shiplu [EMAIL PROTECTED] wrote:
  Why dont you use json as server response? Then manipulate it by own
  javascript. You can use jquery $.getJSON function to do the ajax part
  for you.
 
  On 11/16/07, samantha_o [EMAIL PROTECTED] wrote:
  
   Hi,
  
   i would like to submit forms with ajax, using jquery and then load
 the
  next
   page. I had successfully do it with jquery and form plugin. however,
 it
  does
   not work whenever the server response consist of both HTMLs and
  javascript
   together. Is it possible to make it works? I am new in all this. Can
  anyone
   help me?
   --
   View this message in context:
  
 
 http://www.nabble.com/submitting-forms-with-ajax-tf4819530.html#a13788322
   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 General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

 --
 View this message in context:
 http://www.nabble.com/submitting-forms-with-ajax-tf4819530.html#a13826338
 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] PHP CURL

2007-11-18 Thread Fahad Pervaiz
I am looking forward to write a script that can send invite to contacts in
gmail,hotmail, yahoo and aol. I think it is possible to write it using php
CURL. If yes can any one suggest how?
and can any one help me write this script or join me to write this script?

-- 
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
(Shopping Cart System)