Re: [PHP] POST without POSTing

2009-09-30 Thread Lars Torben Wilson
On Thu, 1 Oct 2009 00:24:41 -0400 Daniel Brown wrote: > On Thu, Oct 1, 2009 at 00:16, Paul M Foster > wrote: > > > > However, assuming it *wasn't*, I've found the following example > > from a google search (thank goodness for google's "hinting" or I > > couldn't have found it): > > > > $fp = fso

Re: [PHP] POST without POSTing

2009-09-30 Thread Daniel Brown
On Thu, Oct 1, 2009 at 00:41, Paul M Foster wrote: > > fsockopen() appears to be part of the standard network functions in PHP, > like the header() function. Do you mean that many hosts support the > function (as part of PHP) but don't support its use with external hosts? > Is there a way to deter

Re: [PHP] POST without POSTing

2009-09-30 Thread Paul M Foster
On Thu, Oct 01, 2009 at 12:24:41AM -0400, Daniel Brown wrote: > On Thu, Oct 1, 2009 at 00:16, Paul M Foster wrote: > > > > However, assuming it *wasn't*, I've found the following example from a > > google search (thank goodness for google's "hinting" or I couldn't have > > found it): > > > > $fp

Re: [PHP] POST without POSTing

2009-09-30 Thread Lars Torben Wilson
On Thu, 1 Oct 2009 00:16:27 -0400 Paul M Foster wrote: > On Wed, Sep 30, 2009 at 11:36:55PM -0400, Daniel Brown wrote: > > > On Wed, Sep 30, 2009 at 23:29, Paul M Foster > > wrote: > > > > > > I'm not sure how to do this. Please no exotic external libraries > > > my shared hosting provider does

Re: [PHP] POST without POSTing

2009-09-30 Thread Daniel Brown
On Thu, Oct 1, 2009 at 00:16, Paul M Foster wrote: > > However, assuming it *wasn't*, I've found the following example from a > google search (thank goodness for google's "hinting" or I couldn't have > found it): > > $fp = fsockopen("www.site.com", 80); > fputs($fp, "POST /script.php HTTP/1.0 > Ho

Re: [PHP] POST without POSTing

2009-09-30 Thread Paul M Foster
On Wed, Sep 30, 2009 at 11:36:55PM -0400, Daniel Brown wrote: > On Wed, Sep 30, 2009 at 23:29, Paul M Foster wrote: > > > > I'm not sure how to do this. Please no exotic external libraries my > > shared hosting provider doesn't include. RTFM will be fine; just tell me > > which Fine Manual to Rea

Re: [PHP] POST without POSTing

2009-09-30 Thread Daniel Brown
On Wed, Sep 30, 2009 at 23:29, Paul M Foster wrote: > > I'm not sure how to do this. Please no exotic external libraries my > shared hosting provider doesn't include. RTFM will be fine; just tell me > which Fine Manual to Read. Nothing too exotic at all, Paul. Check out cURL: http://php

[PHP] POST without POSTing

2009-09-30 Thread Paul M Foster
I'm sure this has been covered before, but I'm not even sure how to search in the archives for it. I have a form that collects certain info via POST. It is re-entrant, so when the user hits the "submit" button, it checks the input and does whatever sanity checks it needs to. If all is okay, it mus

Re: [PHP] Converting print_r() output to an array

2009-09-30 Thread Daniel Brown
On Wed, Sep 30, 2009 at 23:07, James Colannino wrote: > Hey everyone, I was pretty sure there was an easy built-in solution for > what I want to do, but I've been googling around with no luck. > Basically, I just want to take a string containing the output of > print_r() and convert it back into a

Re: [PHP] Converting print_r() output to an array

2009-09-30 Thread Jonathan Tapicer
Hi, May be you want to take a look at serialize and unserialize functions, serialize generates a string from a variable and then unserialize can give you the value of the variable back from the string. Regards, Jonathan On Thu, Oct 1, 2009 at 12:07 AM, James Colannino wrote: > Hey everyone, I

Re: [PHP] Converting print_r() output to an array

2009-09-30 Thread Michael Shadle
first off, if you pass print_r($var, true) it will return it instead of printing it. if you go that route. have you looked at var_export() ? On Wed, Sep 30, 2009 at 8:07 PM, James Colannino wrote: > Hey everyone, I was pretty sure there was an easy built-in solution for > what I want to do, but

[PHP] Converting print_r() output to an array

2009-09-30 Thread James Colannino
Hey everyone, I was pretty sure there was an easy built-in solution for what I want to do, but I've been googling around with no luck. Basically, I just want to take a string containing the output of print_r() and convert it back into an array again. That is possible, right? If so, how do I go ab

Re: [PHP] Where's my memory going?!

2009-09-30 Thread Ralph Deffke
Hi Philip, before u start running arround and taking ur hand on major changes I would like u to concider the following: the way u use the memory_get_usage() is incomplete use the function like memory_get_usage( true ) if this is set the REAL SIZE OF MEMORY ALLOCATED FROM THE SYSTEM is shown. som

Re: [PHP] Where's my memory going?!

2009-09-30 Thread Philip Thompson
On Sep 29, 2009, at 6:15 PM, Eddie Drapkin wrote: On Tue, Sep 29, 2009 at 6:51 PM, Jim Lucas wrote: Philip Thompson wrote: On Sep 29, 2009, at 4:38 PM, Jim Lucas wrote: Philip Thompson wrote: On Sep 28, 2009, at 4:40 PM, jeff brown wrote: Yes, that's the best way to clean up after yoursel

Re: [PHP] Where's my memory going?!

2009-09-30 Thread Philip Thompson
On Sep 29, 2009, at 5:51 PM, Jim Lucas wrote: Philip Thompson wrote: On Sep 29, 2009, at 4:38 PM, Jim Lucas wrote: Philip Thompson wrote: On Sep 28, 2009, at 4:40 PM, jeff brown wrote: Yes, that's the best way to clean up after yourself. And you really should use that on anything you ha

Re: [PHP] Paging script

2009-09-30 Thread Ruben Crespo
O.K Angelo, I wish you that you find the code useful for your projects. Best Regards !! Rubén Crespo 2009/9/30 Angelo Zanetti > > > > > _ > > From: Ruben Crespo [mailto:rumails...@gmail.com] > Sent: 30 September 2009 01:23 PM > To: Angelo Zanetti > Cc: php-general@lists.php.net > Subject

RE: [PHP] Paging script

2009-09-30 Thread Mert Oztekin
This should do it. i didnt have time to test so there may be some bugs. function pageit($limit , $total, $page, $link) { $last = intval($total / $limit) + ($total % $limit ==0 ? 0:1); if(!is_numeric($page) || $page > $last) $page = 1; $pages[] = 1;

RE: [PHP] Paging script

2009-09-30 Thread Angelo Zanetti
_ From: Ruben Crespo [mailto:rumails...@gmail.com] Sent: 30 September 2009 01:23 PM To: Angelo Zanetti Cc: php-general@lists.php.net Subject: Re: [PHP] Paging script Hi all, Maybe it is not just what you need but could be helpfull. Here you have the code: //--

Re: [PHP] Paging script

2009-09-30 Thread Ruben Crespo
Hi all, Maybe it is not just what you need but could be helpfull. Here you have the code: //---paginator.php Page ".$current." of ".$total_pages.""; $Goto = "Go to Page"; $go = "Go"; $texto = "

RE: [PHP] Paging script

2009-09-30 Thread Ashley Sheridan
On Wed, 2009-09-30 at 12:59 +0200, Angelo Zanetti wrote: > > -Original Message- > From: Mert Oztekin [mailto:mozte...@anadolusigorta.com.tr] > Sent: 30 September 2009 12:40 PM > To: 'Angelo Zanetti'; php-general@lists.php.net > Subject: RE: [PHP] Paging script > > Sorry but I dont under

RE: [PHP] Paging script

2009-09-30 Thread Angelo Zanetti
-Original Message- From: Mert Oztekin [mailto:mozte...@anadolusigorta.com.tr] Sent: 30 September 2009 12:40 PM To: 'Angelo Zanetti'; php-general@lists.php.net Subject: RE: [PHP] Paging script Sorry but I dont understand what you mean. Can you be more specific? {1} 2 3 ... 12 (Startup

RE: [PHP] Paging script

2009-09-30 Thread Mert Oztekin
Sorry but I dont understand what you mean. Can you be more specific? {1} 2 3 ... 12 (Startup / Total 12 pages) When you click 7 1 ... 6 {7} 8 ... 12 When you click 11 or 12 1 ... 10 11 {12} Do you mean something like this? -Original Message- From: Angelo Zanetti [mailto:ang...@elementa

[PHP] Paging script

2009-09-30 Thread Angelo Zanetti
Hi All, I am looking for a paging script, not the normal type but slightly different. It must show as follows: 1 2 3 ... 12 Then: 1 ... 678 ... 12 And 1 ... 10 11 12 I have googled and not really found much and don't really want to reinvent the wheel. I am sure I can write my own but du