RE: [PHP] /VAR is driving me crazy - SOLVED

2004-01-16 Thread Boaz Yahav
Actually i just found the problem.
My sysadmin recently added MOD Security and one of the lines that 
my conf file had was : 

SecFilter /var

Security people can drive me crazy :)

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts : http://www.weberblog.com/submit.php?type=story


-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 16, 2004 5:07 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] /VAR is driving me crazy


Boaz Yahav wrote:
> Hi
> 
> Does anyone have an idea what is so special about the string "/VAR" ? 
> If i create a form that submits to a php file and in the form i put 
> the string /VAR anywhere in the text or just /VAR I get an 404 error 
> from apache on an existing
> file. If i take the same form and remove the /VAR string all is ok.
> 
> I'm not sure if this is an apache issue or PHP. Did anyone encounter 
> such a behavior?

The only thing I can think of is that if you're using GET as your form 
method and end up with something like:

www.domain.com/file.php?v=/VAR

then maybe for some odd reason you're web server is actually looking for

a path of "file.php?v=" and "VAR" instead of realizing the "/VAR" is in 
a query string. That shouldn't be happening, though.

-- 
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals - www.phparch.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



[PHP] /VAR is driving me crazy

2004-01-16 Thread Boaz Yahav
Hi

Does anyone have an idea what is so special about the string "/VAR" ?
If i create a form that submits to a php file and in the form i put the
string /VAR
anywhere in the text or just /VAR I get an 404 error from apache on an
existing
file. If i take the same form and remove the /VAR string all is ok.

I'm not sure if this is an apache issue or PHP. Did anyone encounter
such a behavior?

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts : http://www.weberblog.com/submit.php?type=story

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



[PHP] Setting timeout for fopen

2004-01-02 Thread Boaz Yahav
Hi

I can see that socket_set_timeout() will set the timeout for
fsockopen().
What would do the same for fopen?

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts : http://www.weberblog.com/submit.php?type=story

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



RE: [PHP] php blog site for 123php.com

2003-11-29 Thread Boaz Yahav
Have a look at http://www.weberblog.com.
If the site does what you need, you can follow the powered by link on
the bottom of every page.

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts : http://www.weberblog.com/submit.php?type=story


-Original Message-
From: Ryan A [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 29, 2003 10:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php blog site for 123php.com


Hi,
Can anyone recomend a good blog software that does the following:

1. Have differient articles on the first page and show the first x ( or
10) words then a link to the rest eg Php make leaps and bounds in the
field of ... click here to read article

2. Users have to register to post replies/comments (or if possible to
read the whole article)

3. makes search engine friendly urls
eg
123php.com/blog/article777

I have checked hotscripts:
http://www.hotscripts.com/cgi-bin/search.cgi?bool=AND&query=blog&catid=2

and these ones seems a bit good,
http://dev2.bblog.com/item/19/
http://www.acervus.ca/

Any URLs/ideas/suggestions etc are most welcome.

Thanks,
-Ryan

-- 
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] Storing images

2003-11-15 Thread Boaz Yahav
Interesting that you should bring this up now :)
I have started a thread about this with my opinion at :
http://www.weberblog.com/article.php?story=20031115124356140

I hope people will share their experience.

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts :
http://www.weberblog.com/submit.php?type=story&topic=PHP_Web_Logs


-Original Message-
From: Paul Marinas [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 15, 2003 7:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Storing images



Hi, i was wondering which is the best way to store images. I'm using an
upload section for my site and i'm using a script  to put those  images
from the upload section on a diferent section of the site.

10x
Paul
GnuPG Key http://sgi.rdscv.ro/~paulm/paulm.PGP

-- 
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] Alternet row colors

2003-11-15 Thread Boaz Yahav
You can also check :

A PHP function To Make Alternative Colored table rows
http://www.weberdev.com/get_example.php3?count=3609

Alternating background color for HTML table rows
http://www.weberdev.com/get_example.php3?count=3482

Another way to alternate table rows
http://www.weberdev.com/get_example.php3?count=1832

How to display any array in several rows and columns of a table. Not just in one 
column or in alternate rows. This example shows a nice color table generated with PHP, 
but can be used with any array values(e.g. Database)
http://www.weberdev.com/get_example.php3?count=1761

HTML Table with random alternating colours, helps you see what you colour options are.
http://www.weberdev.com/get_example.php3?count=1555

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts : http://www.weberblog.com/submit.php?type=story&topic=PHP_Web_Logs



-Original Message-
From: PAUL FERRIE [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 15, 2003 5:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Alternet row colors


Hello all

I have been working on this website 
http://thor.ancilenetworks.co.uk/~pferrie/vinrev/index2.htm
I did not design the site i have just been asked to tweak it
My php knowledge is limited always learning something new.  Anyways I have been trying 
to use a code that i got from www.hotscripts.com the scipts retutns alternet rows 
colors for information sent back from the database when displayed in the broswer.

Here is the script:
//---


function alternate_rows(
// color_1 and color_2 have default values, but can be over-ridden.
$data,
$color_1 = '#99',
$color_2 = 'black'
)
{
// Declare $color as static so it retains its value when program // execution leaves 
the local function's scope.
static $color;

// Set the color to that's not currently set.
if ( $color == $color_1 )
{
$color = $color_2;
}
else
{
$color = $color_1;
}

echo '' . $data . ''; }

I have tried a few was of implamenting this into my current php code but i have had no 
luck :(


Could some one help me with this please :)
If you check the website and click "top ten" 
http://thor.ancilenetworks.co.uk/~pferrie/vinrev/index2.htm


The code for return the top ten result is :
$result = mysql_query("SELECT * FROM albums where id <15");

$Count = @mysql_num_rows($result);

 echo "\n";
echo "IDARTISTTITLELABELPRICE\n";

for ($count = 0; $count < $Count; $count++) {
// Extract post details from database
$myrow = mysql_fetch_array($result);
$id = $myrow ['id'];
   $artist = $myrow ['artist'];
 $title = $myrow ['title'];
 $label = $myrow ['label'];
 $price = $myrow ['price'];

printf("$id$artist$title$label
£$price\n");
}
 echo "\n";

?>

Cheers
Paul

-- 
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] Calendar

2003-11-13 Thread Boaz Yahav
Check this out : 
http://www.weberdev.com/AdvancedSearch.php?searchtype=title&sort=title&s
earch=calendar

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts :
http://www.weberblog.com/submit.php?type=story&topic=PHP_Web_Logs


-Original Message-
From: Steve Marquez [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 8:50 PM
To: PHP eMail List
Subject: [PHP] Calendar


Hi,

I am looking for a simple easy to edit php calendar program. Does anyone
know where I can find one?

Thanks for your help.

--

Steve Marquez
[EMAIL PROTECTED]

-- 
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] How to remove new line character?

2003-11-07 Thread Boaz Yahav
How to remove new line / CrLf from a string?
http://www.weberdev.com/get_example.php3?count=3577

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts :
http://www.weberblog.com/submit.php?type=story&topic=PHP_Web_Logs


-Original Message-
From: Shu Hung Yeung [mailto:[EMAIL PROTECTED] 
Sent: Sunday, November 02, 2003 6:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to remove new line character?


Hello,

I am a beginner of PHP.

I know a little about Perl.
In Perl, there is a chomp() function to remove newline (return)
character in 
a long string.
How about PHP? Can I do the same in PHP

Thankyou

_
Linguaphone :  Learning English? Get Japanese lessons for FREE 
http://go.msnserver.com/HK/30476.asp

-- 
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] PHP developers

2003-11-07 Thread Boaz Yahav
http://www.weberdev.com/jobmatching/about.php3

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts :
http://www.weberblog.com/submit.php?type=story&topic=PHP_Web_Logs


-Original Message-
From: James [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 06, 2003 8:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP developers


Can anyone recommend a good place where I can find some talented PHP
contractors?

I'm looking to hire some people for some upcoming projects, and I don't
want to just put an ad in the paper and get a bunch of responses from
barely-qualified people.

Thanks,
J

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



[PHP] (Semi OT) Number of concurent Users.

2003-10-28 Thread Boaz Yahav
Hi

I was wondering if anyone has any idea about how many users
the next configuration can hold : 

Front End
=
Dual Xeon 2.4Ghz
Compaq DL360 G3 
1GB of memory

SQL Server
=
Compaq DL 380 G3
Dual Xeon 2.4Ghz
2GB Memory
15K disks (RAID 0+1)

Site can be a content site like weberdev.com or a simple ecommerce site
running on Linux / Apache / MySQL / PHP.
Any idea how many concurrent users can run on such a configuration?
Any idea how this number will grow using one of the performance suits
for PHP on the market?

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com
Share your thoughts :
http://www.weberblog.com/submit.php?type=story&topic=PHP_Web_Logs


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



[PHP] (ANNOUNCE) New PHP & MySQL Web Log Site

2003-10-17 Thread Boaz Yahav
Hello 

I was not sure that it's a common practice to send PHP related
announcements
to the list so i asked and was told it's ok.

Just wanted to let anyone interested that after almost 6 years,
http://www.weberdev.com 
now has a new brother (sister?) site called http://www.weberblog.com.
This new site
is a community site, where matters related to PHP & MySQL are discussed.
There are 
already a few interesting  blogs and more will begin in the next few
days.

I Hope you find the site helpful and would love to see you there adding
your thoughts.

I would appreciate any comments, suggestions you may have. It's a new
site so
be easy on me :)

Sincerely
 
berber
 
Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com


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



RE: [PHP] Dwonload with PHP do not work..

2003-09-28 Thread Boaz Yahav
Try this :

How to let a user download a picture by clicking on it instead of needing to right 
click and Save-As.
http://www.weberdev.com/get_example.php3?count=1562

How to force the user to download a file instead of opening it up in an controlled 
environment within the browser (i.e. MS Word/Adobe Acrobat)
http://www.weberdev.com/get_example.php3?count=1627

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com


-Original Message-
From: Ms Carlsson [mailto:[EMAIL PROTECTED] 
Sent: Sunday, September 28, 2003 1:13 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Dwonload with PHP do not work..


$file = "/home//openssh-3.6.1p1.tar.gz";
$mb = filesize($file);
$download = "openssh-3.6.1p1.tar.gz";

$fp = fopen($file, "r");

  Header ( "HTTP/1.1 206 One resume, coming up!" );
  Header ( "Pragma: no-cache" );
  Header ( "Content-Type: application/octet-stream" );
  Header ( "Content-Length: ".filesize("$file") );
  Header ( "Content-Disposition: attachment; filename=$download" )$

  readfile("/home//openssh-3.6.1p1.tar.gz");
  exit;




THis start a download but give me a corrupted downloaded file... Any help out 
here..

_
Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/

-- 
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] Sotre image created by GD in db

2003-08-30 Thread Boaz Yahav
Can you save it to a file?
If you can save it to a file, have a look at : 

Saving Images in MySQL
http://www.weberdev.com/ViewArticle.php3?ArticleID=3

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com



-Original Message-
From: Mohammadreza Hassanrezaeian [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 30, 2003 12:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Sotre image created by GD in db


Dear Guys,
I want to store an image created by GD functions to a field of my DB. I
can not save it to a string to save it to blob field. Can any one help
me with a simple sample code? Regards, Mohammad

-- 
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] google style paginating

2003-08-23 Thread Boaz Yahav
Try this :

Paginator - a class that can help you to split MySQL database query result sets to 
pages.
http://www.weberdev.com/get_example.php3?count=3707

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com


-Original Message-
From: Ted Conn [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 11:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP] google style paginating


Hi I am new to this newsgroup and I plan on replying to all the posts I can for now... 
but Id like to start out by asking a question. I am trying to paginate my sql results 
in 10 by 10, which I have been able to do no problem. but what I want to do is have 
the pages layed out in google style with (1)(2)(3)(4) etc etc and each one is 
clickeable that will take you to that page. I'll show you the code I am using now for 
next and back buttons...



//located at top of page


//start of body, this verifies that so is numeric, divisible by 10, and a valid number 
 $num_rows) || ($_GET['so'] < 0) )
  $so='0';
 else
 {
  if ($_GET['so'] % 10)
   $so='0';
  else
   $so=$_GET['so'];
 }
}
else
 $so='0';
?>

//return results



// next and back buttons

=10)
  {
  $sortback= $so-10;
  echo "<< 
Atras" ;
  }
  ?>
 0 )
  echo "  Siguiente >> ";
   ?>


DID I PUT WAY TO MUCH CODE?? Sorry, and I apreciate your help.

How can I implement the google style paging into this code?

Thank you...




Ted Conn Lider de Proyectos [EMAIL PROTECTED] Scinet México S.A. de C.V.
+52 (222) 294-05-95 al 97 Sin costo: 01-8000-DOTCOM Puebla · DF · 
+Monterrey
www.scinet.com.mx



-- 
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] Easy XML & PHP tutorials ?????

2003-08-23 Thread Boaz Yahav
Try this too : http://www.sitepoint.com/article/1165

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com


-Original Message-
From: Joe Harman [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 1:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Easy XML & PHP tutorials ?


Hello all. does anyone have any very easy XML tutorials . I have a
simple weather feed I want to implement. but no XML experience

thanks

Joe Harman




 


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



RE: [PHP] better understanding of ereg_replace and other functions

2003-08-16 Thread Boaz Yahav
Try these :

preg_replace
http://www.weberdev.com/AdvancedSearch.php?searchtype=example&sort=examp
le&example=preg_replace

str_replace
http://www.weberdev.com/AdvancedSearch.php?searchtype=example&sort=examp
le&example=str_replace

strpos
http://www.weberdev.com/AdvancedSearch.php?searchtype=example&sort=examp
le&example=strpos

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for PHP Code from your browser http://toolbar.weberdev.com




-Original Message-
From: Binay Agarwal [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 16, 2003 2:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] better understanding of ereg_replace and other functions


Hi everybody,

Lot of places in manual i came across using "ereg_replace" or "ereg" is
very resource intensive and hence its better to use "preg_replace" or
"str_replace" or "strpos" if they do the jobs.

Now i am very curious to look at the source code (implementation) of
these function so as to be able to decide the right choice for me. Can
any one of you tell me where to find the source code of these functions.
Do they require special privileges ??

Please help me out


Binay

 


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



[PHP] Downloding files once

2003-08-14 Thread Boaz Yahav
Hi

I'm trying to allow users to download files from my servers. Files can
be hundreds of MB in size
and sometimes even a few GB. This is a closed section of the site and i
would like to allow only
members to be able to DL the files.

I thought of using a download function that uses headers and readfile()
or fread(). This way i can
check who is the user and send / not send the file. However, this does
not seem to work with 
such big files.

Another idea is to use Apache Mod Rewrite and check that the user has
the referrer of the
download server. I'm assuming that he will only have this if he had
access to a link to the 
file from the server it's self and such a link will only be provided to
members. As far as i can
think, you can only fake a referrer by writing your own client.

If anyone has any ideas or comments I'll be very happy to get them.

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


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



[PHP] Commands out of sync; You can't run this command now

2003-08-14 Thread Boaz Yahav
Hi

For a few days or maybe even a week or two I'm getting this error
message in my site.
This happens when i do : mysql_select_db()

This doesn't happen all the time and there are pages that it happens
more than others
so it seems.

I looked in the manual and the explanation there doesn't apply to me.
Any ideas?

http://mickey.lcsc.edu/manual.html#Commands_out_of_sync

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


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



[PHP] RE: Commands out of sync; You can't run this command now - "SOLVED"

2003-08-14 Thread Boaz Yahav
In case anyone is interested, I got several emails about this but no one
actually 
gave me the right location to look.

1st, the solution was to change pconnect to connect.
2nd, the bug is reported here : http://bugs.php.net/bug.php?id=19529

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com
Search for code from your computer : http://toolbar.weberdev.com


-Original Message-
From: Boaz Yahav 
Sent: Wednesday, August 13, 2003 9:47 PM
To: [EMAIL PROTECTED]
Subject: Commands out of sync; You can't run this command now


Hi

For a few days or maybe even a week or two I'm getting this error
message in my site. This happens when i do : mysql_select_db()

This doesn't happen all the time and there are pages that it happens
more than others so it seems.

I looked in the manual and the explanation there doesn't apply to me.
Any ideas?

http://mickey.lcsc.edu/manual.html#Commands_out_of_sync

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


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



[PHP] RE: Downloding files once

2003-08-08 Thread Boaz Yahav
passwords can be kept encrypted with mod_auth with no problem.

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 8:04 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]; Igal Rubinstein; Matt Wade
Subject: Re: Downloding files once


Hello,

On 08/06/2003 03:56 PM, Boaz Yahav wrote:
> What about using mod_auth_mysql to add/remove usernames and passwords 
> from the download server in real time?

Never tried but it could work. The only problem is that for basic auth 
you need to keep passwords in plain text in the database.

-- 

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

 


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



RE: [PHP] Downloding files once

2003-08-08 Thread Boaz Yahav
Can you fake a referrer by say, using fsockopen() and sending your
own headers?


-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 4:57 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Downloding files once


* Thus wrote Boaz Yahav ([EMAIL PROTECTED]):
> 
> I thought of using a download function that uses headers and 
> readfile() or fread(). This way i can check who is the user and send /

> not send the file. However, this does not seem to work with
> such big files.

you most likely are running into the script timeout when people are
downloading the  file.  I would in this case, use fread so you can do
some checking in between sends and if bandwidth becomes a problem you
can do some bandwidth throttling:

set_timelimit(0);
while (! feof() {
  if (connection_aborted() ) {
break; // no need to send the data now.
  }
  fread();
  print $data;
}
  

> 
> Another idea is to use Apache Mod Rewrite and check that the user has 
> the referrer of the download server. I'm assuming that he will only 
> have this if he had access to a link to the
> file from the server it's self and such a link will only be provided
to
> members. As far as i can
> think, you can only fake a referrer by writing your own client.

I would discourage this for the fact that the referer can easily be
faked.  If you downloads are important to the general public and word
gets out that the referer is your security.. say good bye to your
bandwidth :)

> 
> If anyone has any ideas or comments I'll be very happy to get them.

HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] RE: Downloding files once

2003-08-06 Thread Boaz Yahav
What about using mod_auth_mysql to add/remove usernames and passwords
from 
the download server in real time?

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 7:52 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]; Igal Rubinstein; Matt Wade
Subject: Re: Downloding files once


Hello,

On 08/06/2003 03:48 PM, Boaz Yahav wrote:
> This may work but i can't help thinking that this is the wrong way to 
> go. Downloading 1GB or 2GB files via fpassthru doesn't feel right...

Why not? As long as it works without blowing your server memory that is 
fine.

The only problem you may have is when the users resort to download 
managers, as this way they won't be able to stop and resume later. If 
you play with the HTTP headers and fseek, that can be solved too.


-- 

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

 


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



[PHP] RE: Downloding files once

2003-08-06 Thread Boaz Yahav
This may work but i can't help thinking that this is the wrong way to
go.
Downloading 1GB or 2GB files via fpassthru doesn't feel right...

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 06, 2003 7:41 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]; Igal Rubinstein; Matt Wade
Subject: Re: Downloding files once


Hello,

On 08/06/2003 12:43 PM, Boaz Yahav wrote:
> I'm trying to allow users to download files from my servers. Files can

> be hundreds of MB in size and sometimes even a few GB. This is a 
> closed section of the site and i would like to allow only
> members to be able to DL the files.
> 
> I thought of using a download function that uses headers and 
> readfile() or fread(). This way i can check who is the user and send /

> not send the file. However, this does not seem to work with
> such big files.

I think you are exceeding your PHP memory limit. I suggest that you use 
fpassthru or maybe fread in many chunks of 100K and use flush() after 
each chunk echo so you pass the data back to Apache instead of keeping 
it in your PHP memory space.

-- 

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

 


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



RE: [PHP] how can I get errors to display in a browser?

2003-08-03 Thread Boaz Yahav
Try adding : 

error_reporting(2039); as the 1st line in your file.


Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


-Original Message-
From: jsWalter [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 03, 2003 9:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] how can I get errors to display in a browser?


I have a test script, with deliberate errors.

The broswer shows nothing, blank, empty.

It used to show errors, now it does not.

No idea what I did to turn it off.

Can someone tell me hoew to turn it back on?

In my php.ini file, it says...

 error_reporting  =  E_ALL

I thought that was what it needed.

I guess not.

Thanks

walter




-- 
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] fsockopen

2003-07-22 Thread Boaz Yahav
If you only need the HTML why don't you look up file()

http://www.weberdev.com/get_example.php3?count=729

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


-Original Message-
From: Doug La Farge [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 22, 2003 12:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] fsockopen


Is there a way to get fsockopen to suppress the header information it 
returns.  I have no use for the crap, have no idea how to use a regexp 
to get it out of there (nor does anyone on this list it would seem 
either).


I'd like to be able to grab a web page as it is presented to the 
browsers (as seen in view source).

HTTP/1.1 200 OK
Date: Tue, 22 Jul 2003 05:14:41 GMT
Server: Apache/1.3.27 (Unix) mod_jk/1.1.0 mod_ssl/2.8.12 OpenSSL/0.9.6g
Set-Cookie: JSESSIONID=jwjesefa81;Path=/Interface
Connection: close
Content-Type: text/html;charset=ISO-8859-1

The above crap needs to not be returned.

Any ideas?

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



RE: [PHP] PHP-mySQL-opensource-shop - solution

2003-07-22 Thread Boaz Yahav
Main > Web Programming > PHP > E-commerce 
http://www.weberdev.com/Index/LinkIndexInner.php3?CatID=269&CatName=PHP+
Ecommerce+Projects&IsMaster=0&OrigCatID=270

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com




-Original Message-
From: Alexander [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 22, 2003 2:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP-mySQL-opensource-shop - solution


Hi to all,

I'm looking for a PHP-mySQL-opensource-shop - solution. Any suggestions
or 
experiencies that could be usefull. Wich

TIA
Alexander


-- 
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] images in databases & Flash via PHP

2003-07-22 Thread Boaz Yahav
Saving Images in MySQL
http://www.weberdev.com/ViewArticle.php3?ArticleID=3

Sincerely
 
berber
 
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
Share your code : http://addexample.weberdev.com


-Original Message-
From: Tim Baker [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 22, 2003 7:01 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] images in databases & Flash via PHP



I was wondering - are there any good tutorials/examples of
serving & updating images from a mySQL database via PHP?  I assume this
is possible, but I'm almost a newbie having not used PHP/mySQL for ages
with some knowledge but would like to know more...

Also now Flash MX can dynamically take JPEGs and MPEGs in
'dynamically' at runtime now, anyone combined this with PHP/mySQL to
serve images? (I'd guess someone or many people have :-) 

I've done it from the Flash only side, loading variables and
images/music, building modular duplicated movieclips etc. and want to do
the next step which is to combine that with databases (I'm currently
using text files, files on a webserver etc.)

thanks

Tim Baker 

-- 
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] timestamp problem !!

2003-07-15 Thread Boaz Yahav
Read the last comment at the bottom of this page :
http://www.weberdev.com/get_example.php3?count=787

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Nabil [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 15, 2003 8:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] timestamp problem !!


i have



and i have a wrong result how can i extract the -MM-DD from the
string $timy

Please Advice

Nabil



-- 
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] Weird Date problem driving me crazy...

2003-07-13 Thread Boaz Yahav
Thanks John, your answer is right on the $$$.
Changing the query to  something like : SELECT
UNIX_TIMESTAMP(ProblemStart) as ProblemStart

solved the problem.

Do i feel sheepish... actually double sheepish cause i already solved
this
long ago and forgot about it :(

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 13, 2003 5:01 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Weird Date problem driving me crazy...


Boaz Yahav wrote:

> I have two date strings coming out from MySQL.
> Both fields are defined as datetime.
> 
> When i come to print them like this :
> 
>   Echo"Ticket Opened : " . date("l, F jS Y
> H:i",$row->OpenDate) . "";
>   Echo"Problem Start : " .  date("l, F jS Y
> H:i",$row->ProblemStart) . "";
> 
> I get :
> 
> Ticket Opened : Sunday, July 13th 2003 13:37
> Problem Start : Thursday, January 1st 1970 02:33
> 
> Notice that the 2nd date is wrong and it's some kind of default that 
> the function returns. Only if i add strtotime() and only to the 2nd 
> field do i get the correct answer :
> 
> Ticket Opened : Sunday, July 13th 2003 13:37
> Problem Start : Saturday, July 12th 2003 20:36

date() expects a UNIX timestamp to be passed to it. MySQL does not store

dates as a UNIX timestamp in DATE, DATETIME, or TIMESTAMP columns. 
strtotime() will take a MySQL timestamp, though, and convert it to a 
UNIX timestamp.

Also look into using DATE_FORMAT() in your query to format the data 
there so you don't have to do anything in PHP.

-- 
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals - www.phparch.com





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



[PHP] Weird Date problem driving me crazy...

2003-07-13 Thread Boaz Yahav
I have two date strings coming out from MySQL.
Both fields are defined as datetime.

When i come to print them like this :

Echo"Ticket Opened : " . date("l, F jS Y
H:i",$row->OpenDate) . "";
Echo"Problem Start : " .  date("l, F jS Y
H:i",$row->ProblemStart) . "";

I get :

Ticket Opened : Sunday, July 13th 2003 13:37
Problem Start : Thursday, January 1st 1970 02:33

Notice that the 2nd date is wrong and it's some kind of default that the
function
returns. Only if i add strtotime() and only to the 2nd field do i get
the correct answer :

Ticket Opened : Sunday, July 13th 2003 13:37
Problem Start : Saturday, July 12th 2003 20:36


any idea?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.






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



RE: [PHP] cookie question

2003-07-04 Thread Boaz Yahav
Go to your browsers setting and ask the browser to prompt before setting
cookies.
in IE go to : tools -> Internet Options -> Privacy --> Advanced -->
Override automatic cookie handling.

See if your page tries to set the cookie at all.
If not, try to add : error_reporting(2039); 
maybe you are sending the headers before you set the cookie.

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: David R [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 04, 2003 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cookie question


I tried it that way, and variations on it. I still have had no luck. Any
other ideas? Thanks again David R Thanks for you he "Boaz Yahav"
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Try

setcookie("auth","$val",time() + 3600,"/",".avenew.com");


also look here : http://examples.weberdev.com/get_example.php3?count=67

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: David R [mailto:[EMAIL PROTECTED]
Sent: Friday, July 04, 2003 9:44 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cookie question


I have never read anything about a production server domain. How do I
set the cookie for it? Thanks. David R


"Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> David R wrote:
>
> >Hello,
> >I have a cookie question.
> >
> >I have the following code is a file called tc.php
> >
> > >global $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $settings, $sql ;
> >$val="123";
> >setcookie ("auth", $val , time() + 3600);
> >$cookie = $HTTP_COOKIE_VARS['auth'];
> >echo "cookie is: $cookie";
> >?>
> >
> >I have no problem retrieving the value cookie value ( 123 ) on my 
> >local machine but when I post to the internet I can't get the cookie 
> >value.
> >
> >Any ideas why?
> >
> Did you set the cookie for the production server domain?  Cookies for 
> your local machine won't still be there once you upload, you know.
>
> --
> The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent
of the law.
>
>



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


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



RE: [PHP] Setting Cookie Going Nuts

2003-07-04 Thread Boaz Yahav
Did you solve this issue?
What does $_SERVER["HTTP_HOST"] return?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Mike Morton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2003 4:03 PM
To: [PHP - GENERAL]
Subject: [PHP] Setting Cookie Going Nuts


I am trying to issue a cookie, using the set cookie directive, and it is
not working for some reason.  The code below I have used before with
perfect success.  The only difference between the other place that I am
using it is that the other place has globals on, this server has globals
off (tho I turned them on a and it made no difference), and the other
server is running 4.3.2 where this one is 4.3.0

I am sure that it is something small that I missed when copying the code
over, but I cannot for the life of me see what it is.  The only other
difference is the other server is using a domain name, while the server
this code is on is an IP address only (that should not make a difference
tho)

Why is the cookie not being isseued?  I am going nuts trying to figure
this out!

$ADMIN_COOKIE_NAME="scavengeradmin"; //name of the issuing cookie
$COOKIE_EXPIRY=1800; //time in seconds to expiry

function adminCookie() {
global $ADMIN_COOKIE_NAME,$COOKIE_EXPIRY;

//check to see if a cookie exists already.
$cookieid=$_COOKIE[$ADMIN_COOKIE_NAME];

//if there is no cookieid - then we are going to set a cookie.
if(strlen($cookieid) < 1) {
//find a unique value.
list($msec,$sec)=explode(" ",microtime());
$cookiekey=ereg_replace("\.","",($msec+$sec));
//set expiry - 30 mins from now.
$cookieexpiry=time()+$COOKIE_EXPIRY;

setcookie($ADMIN_COOKIE_NAME,$cookiekey,$cookieexpiry,"/",$_SERVER["HTTP
_HOS
T"],0);
$_COOKIE[$ADMIN_COOKIE_NAME]=$cookiekey;
unset($cookiekey);unset($msec);unset($sec);unset($cookieexpiry);
} else {
//if the cookie has been set then we are just going to adjust
the expiry date.
//set expiry - 30 mins from now.
$cookieexpiry=time()+$COOKIE_EXPIRY;

setcookie($ADMIN_COOKIE_NAME,"$cookieid",$cookieexpiry,"/",$_SERVER["HTT
P_HO
ST"],0);
unset($cookieexpiry);
}

unset($cookieid);
}

adminCookie(); //issue the cookie

--
Cheers

Mike Morton


*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*


"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up
with Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


-- 
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] Need a function to calculate time difference.

2003-07-04 Thread Boaz Yahav
See if this helps you

Getting the difference between two time strings.
http://examples.weberdev.com/get_example.php3?count=3307

Difference between two dates (i.e. between today and a date in future).
The program is 
based on php-timestamp, but in your browser you see the usual
dates(i.e.: dd.mm.)
http://examples.weberdev.com/get_example.php3?count=3240

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Jack Sasportas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2003 10:17 PM
To: php
Subject: Re: [PHP] Need a function to calculate time difference.


datetime.

Thanks

Jim Lucas wrote:

>what type of format does your column take?
>
>date
>time
>datetime
>
>??
>
>Jim Lucas
>- Original Message -
>From: "Jack Sasportas" <[EMAIL PROTECTED]>
>To: "php" <[EMAIL PROTECTED]>
>Sent: Wednesday, July 02, 2003 2:11 PM
>Subject: [PHP] Need a function to calculate time difference.
>
>
>  
>
>>I am trying to find a function or information on how to properly take 
>>a
>>start time and an end time from mysql timestamps in order to calculate

>>time taken.
>>So in theory $endtime-$starttime = timespent.
>>
>>It would be great if this understood that 11:55 pm til 12:10am one day
>>apart only equals 15 minutes.
>>
>>Links, example code etc would be great!
>>
>>Thanks
>>
>>
>>--
>>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


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



RE: [PHP] cookie question

2003-07-04 Thread Boaz Yahav
Try 

setcookie("auth","$val",time() + 3600,"/",".avenew.com");


also look here : http://examples.weberdev.com/get_example.php3?count=67

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: David R [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 04, 2003 9:44 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] cookie question


I have never read anything about a production server domain. How do I
set the cookie for it? Thanks. David R


"Leif K-Brooks" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> David R wrote:
>
> >Hello,
> >I have a cookie question.
> >
> >I have the following code is a file called tc.php
> >
> > >global $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $settings, $sql ;
> >$val="123";
> >setcookie ("auth", $val , time() + 3600);
> >$cookie = $HTTP_COOKIE_VARS['auth'];
> >echo "cookie is: $cookie";
> >?>
> >
> >I have no problem retrieving the value cookie value ( 123 ) on my 
> >local machine but when I post to the internet I can't get the cookie 
> >value.
> >
> >Any ideas why?
> >
> Did you set the cookie for the production server domain?  Cookies for 
> your local machine won't still be there once you upload, you know.
>
> --
> The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent
of the law.
>
>



-- 
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] Subtracting dates in php

2003-07-01 Thread Boaz Yahav
Try : 

Difference between two dates (i.e. between today and a date in future).
The program is based on php-timestamp, but in your browser you see the
usual dates(i.e.: dd.mm.)
http://examples.weberdev.com/get_example.php3?count=3240

Find the Difference between today's date and a future day.
http://examples.weberdev.com/get_example.php3?count=3198

how can I output the difference between two dates?
http://examples.weberdev.com/get_example.php3?count=95


Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-Original Message-
From: Mike Mannakee [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 01, 2003 7:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Subtracting dates in php


Anyone know of an easy way to add or subtract dates in php the way you
can in mysql?  Easier, that is, than coding the logic by hand?  This
seems like a total pain.

Mike



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



[PHP] RE: Curl & NTLM

2003-06-25 Thread Boaz Yahav
I mean NTLM :)

-Original Message-
From: Andrew Ziem [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 26, 2003 5:27 AM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]
Subject: Re: Curl & NTLM


Try the PHP file() command.

Assumably you mean HTML not NTML.


Andrew
http://cday.sourceforge.net

Boaz Yahav wrote:
> Does anyone have a code snippet that connects to a remote server using

> NTML and gets the HTML source?
> 
> Sincerely
> 
> berber
> 
> Visit http://www.weberdev.com/ Today!!!
> To see where PHP might take you tomorrow.



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



RE: [PHP] ereg_replace and quotation marks

2003-06-24 Thread Boaz Yahav
Your example should work
Maybe something else is the problem?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Paul Nowosielski [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 24, 2003 8:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] ereg_replace and quotation marks


I'm trying to strip quotation marks out of user from input but it
doesn't seem to work correctly.

$string=ereg_replace("\"","",$string);

I get a \ mark after I run a quote  through the form. When I want the
quote turned to nothing.

Any suggestions??

Paul
 


-- 
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] Month name

2003-06-24 Thread Boaz Yahav
Check out : http://www.php.net/manual/en/function.date.php

M  - A short textual representation of a month, three letters Jan
through Dec 

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: cavagnaro [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 8:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Month name


How can I get the month name from a date? If you could post with an
example i'll be gratefull



-- 
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] Sorting Country List

2003-06-24 Thread Boaz Yahav
Why don't you just add a hard coded line like this:

USA

as the 1st option in your select box?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Ralph [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 6:43 AM
To: PHP General Mailing List
Subject: [PHP] Sorting Country List


I am getting a list of all countries from mysql database, and then I am
sorting by country name. However since most orders will be from US I
want the US to appear first over the rest of the countries. How can I go
about doing this?

Currently, this is my query:

SELECT countries_id, countries_name FROM TABLE_COUNTRIES ORDER BY
countries_name;



-- 
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] Performance question

2003-06-23 Thread Boaz Yahav
It depends on your HW / Application / number of visitors.
If you are planning to have many visitors and plan this number to
constantly
grow than you should avoid going to the DB as much as possible.

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Hardik Doshi [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 23, 2003 5:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Performance question


Hi Group,

I have a question regarding retrieving the
information. I have the functionlity in which on every
user click, system needs to retrieve information for
particular user and display the page according to the
retrieved information. Now question is which is the
scalable solution? (1) Retrieve information from the
database on each user click. (2) Retrieve information
from the session (here information is retrieved once
and stored in the session file on the server, when
user logs into the system)

Please let me know

Thanks

Hardik

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.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



[PHP] Curl & NTLM

2003-06-23 Thread Boaz Yahav
Does anyone have a code snippet that connects to a remote server using
NTML
and gets the HTML source?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

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



RE: [PHP] Another hosting question....

2003-06-18 Thread Boaz Yahav
Check out :  http://weberdev.ref.phenominet.com

This is your one stop shop for hosting. WeberDev.com is hosted there
and I can tell you that their service is amazing. They are fast,
reliable
and more than anything, very professional (specially in PHP / MySQL).
I have a dedicated server there for years.

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.



-Original Message-
From: Mike Morton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 19, 2003 1:52 AM
To: PHP eMail List
Subject: [PHP] Another hosting question


I know that this subject has been beaten to death, but I going through
old lists, I see a lot of hosting companies for site hosting, but I am
interested specifically in dedicated server hosting.

It is tough to find a hosting facility that is state of the art, with
big pipes and redundancy, but is not a huge corporate company that could
not care less about you

What I am looking for specifically is a company that someone can
recommend from direct experience, one that is customer friendly, offers
dedicated servers at a REASONABLE price, offers admin support and server
support, etc, etc, etc, and most importantly has expertise in compiling
PHP.

If anyone out there know of a company like this and can recommend them -
I would appreciate it :) It will save literally hours and hours of
sorting through the  google listings that a php dedicated hosting search
brings back!  (2 days of sorting to this point anyhow!)

TIA

--
Cheers

Mike Morton


*
* Tel: 905-465-1263
* Email: [EMAIL PROTECTED]
*


"Indeed, it would not be an exaggeration to describe the history of the
computer industry for the past decade as a massive effort to keep up
with Apple."
- Byte Magazine

Given infinite time, 100 monkeys could type out the complete works of
Shakespeare. Win 98 source code? Eight monkeys, five minutes.
-- NullGrey 


-- 
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] mySQL: Rows and columns

2003-06-18 Thread Boaz Yahav
how about :

Start Using MySQL
http://articles.weberdev.com/ViewArticle.php3?ArticleID=247

Beginners guide to PHP/MySQL - Creating a simple guest book
http://articles.weberdev.com/ViewArticle.php3?ArticleID=26

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: zavaboy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2003 7:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mySQL: Rows and columns


I know this is more of a mySQL question but, how do I delete and add
rows and columns?

-- 

- Zavaboy
[EMAIL PROTECTED]
www.zavaboy.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



RE: [PHP] working with forms

2003-06-18 Thread Boaz Yahav
You already have the information you need, call the previous page again
with this info + a message about what was wrong.

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.




-Original Message-
From: Matt Palermo [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2003 7:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] working with forms


I have a forms page that a user will fill out.  When it is submitted, it
checks to see if any of the field entries entries are empty, and if so,
it has a die() statement that has a link (javascript:history.back())
which sends the user back to the form page.  However, when they go back
to the form page, all the entries they made are erased and they need to
redo everything.  Is there and easy way to have them go back with all
their previously inputted data still filled in?  Let me know.

Thanks,

Matt

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



RE: [PHP] picture help

2003-06-18 Thread Boaz Yahav
This might help :

array img_resize(string 'path to source image', string 'path to
destination image', string mode, int size); 
modes: 
"h" - Height 
"w" - Width 
"a" - auto (resizes by the largest dimension)

http://examples.weberdev.com/get_example.php3?count=157

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Edward Peloke [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2003 10:39 PM
To: [EMAIL PROTECTED] Php. Net
Subject: [PHP] picture help


Hello all, I have this code that takes an image sent from a form and
resizes it for a thumbnail and for display, the problem is the pictures
look nice until this does the resizing, then the quality is
horrible...can I fix it?

Thanks,
Eddie




-- 
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] Form Elements - user adding dynamically

2003-06-17 Thread Boaz Yahav
How would you make the input boxes open one above the other instead of
one after the other?

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 17, 2003 4:18 PM
To: Nelson Goforth
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Form Elements - user adding dynamically


You can use DOM:





Any number you like


function newNumber(f) {
var newfile=document.createElement("input");
newfile.setAttribute("type","text");
newfile.setAttribute("name","number[]");
f.appendChild(newfile);
}








 







Nelson Goforth wrote:
> I'm constructing an HTML form (via PHP) in which I want the user to be
> able to add or delete elements as needed.
> 
> For instance, in a page detailing user information, the user might 
> have
> one phone or several.  Rather than having a set number of slots for 
> phone numbers I'd have one slot and have a button by which the user 
> could add a slot.  The user could also delete a number in a similar
manner.
> 
> The design goal is something like Apple's iTools web page construction
> tool.  Beside each slot is a "-" and a "+" to delete that slot or to
add 
> another one just under the existing slot.
> 
> I've got something worked out that is beginning to work, but I 
> wondered
> if anyone on the list had faced a similar problem or knows of an
example 
> script that handles a problem like that.
> 
> Thanks,
> Nelson
> 
> 


-- 
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] extracting text from text file to be used in PHP

2003-06-14 Thread Boaz Yahav
You can also use regular expressions.
Here is an example :

How to extract a string from a bigger string or from an HTML block with
regex and PHP
http://examples.weberdev.com/get_example.php3?count=3167

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Lance Q [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 14, 2003 1:41 AM
To: [EMAIL PROTECTED]
Subject: [PHP] extracting text from text file to be used in PHP


Hello all,

One of the sites I host is a radio station. Their computer has been
setup to automagically upload the current song and the next song to
their web site via FTP. Unfortunately, the format it comes in is pretty
awful. (See below).  The CURRENT CutID is: 70428 The Type is: MUS
The ArtistName is: Nena The SongTitle is: 99 Luft Balloons (German) The
Duration is: 00:03:48 

What I would like to know how to do is extract the relevant info
(everything after the : for instance) and manipulate it, possibly as a
variable so that $ArtistName=Nena for instance.

I've looked through the php.net manual for fgets and such, but no luck.

Thanks in advance,
Lance



-- 
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] preg_match ;)

2003-06-10 Thread Boaz Yahav
Try this :

foo ·";
preg_match('/3:(.*?)·/i',$str,$result);
Echo $result[1];
?>

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-Original Message-
From: Johannes Reichardt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2003 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] preg_match ;)


Hi there!

Sorry for annoying you with stupid questions, but actually i am fooling around with 
this problem since hours:

3:foo ·

what i need is (what else?) foo.

i followed the http referer example on php.net but i simply failed - i never get foo 
if i try to match it somewhat like this:

preg_match("/(:)?([^&]+)/i", $value, $matches);


i tried many variations of this version, but all failed

someone who could enligthen me?

Mit freundlichen Grüssen   |*|
   |*|
[Johannes Reichardt]   |*|
   |*|
Webaddict +49172/3895500   |*|
gramba.net:typorized.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



RE: [PHP] regexp for URL

2003-06-08 Thread Boaz Yahav
Try this :

How to use regular expressions to get the list of links from an HTML
page
http://examples.weberdev.com/get_example.php3?count=1401

extract_links(); Extract all local links from a URL
http://examples.weberdev.com/get_example.php3?count=

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Mattia [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2003 7:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] regexp for URL


Does anyone have a good regular expression for capturing all http URL in

a string?
now i'm using ?(http://[a-z0-9-/_;&=+-\.\?:@]+)\b?mi
in one of my programs, that is, all strings beginning with http:// and 
contain chars like a-z0-9 ...

does anione have something better?

thank you


-- 
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] Hi I get some problems while using eregi_replace

2003-06-08 Thread Boaz Yahav
Try these :

A function that parses a string and replaces http://whatever with a
link, and email addresses 
with a mailto link. This function was designed for the motd package. But
will work freely on its own. 
http://examples.weberdev.com/get_example.php3?count=1235


How to change all of the links in a string to be HTML links.
http://examples.weberdev.com/get_example.php3?count=1567



Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.




-Original Message-
From: winst0n [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2003 5:23 AM
To: php
Subject: [PHP] Hi I get some problems while using eregi_replace


Hi, so first of all, I'm sorry for my bad english.
I'll try to write as better as I can, but I think it will be readable ;)

So, this is 3 code unsing eregi_replace, but they dont work as well...

If some one can give me a help, it's will be great.

Many thx !

/ code /

/* transform [color=FF]colored text[/color] to colored text */ $message = eregi_replace
("[color=(.*)](.*)[/color]","\\2",$message);

/* transform [url=xxx]link![/url] to link! */ $message
= eregi_replace ("[url=(.*)](.*)[/url]","\\2",$message);

/* transform [b]big text[/b] to big text */
$message = eregi_replace
(".*([b]).*([/b]).*","\\1\\2\\3",$message);


-- 
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] Where to start?

2003-06-08 Thread Boaz Yahav
Try this :

http://www.weberdev.com/index.php3?GoTo=search.php3%3Fcategory%3DEcommer
ce%26searchtype%3Dcategory

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Simon Thurtle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Where to start?


Hi all,
I am looking into learning PHP, I have a good understanding of HTML, JS
and I know a little Perl. Firstly I know PHP is all server side and so a
damn sight different from the above, but will they help me at all?
Secondly where do I start? Are there any good on-line resources and or
books that anyone knows? I am plannig to develop an E-comm solution us
Oscommerce, does anyone know if this is any good or is naff? Any hints,
tips or pointers would be greatly appreciated.

Thanks,

Simon




-- 
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] stripping newlines from a string

2003-06-08 Thread Boaz Yahav
How to remove new line / CrLf from a string
http://examples.weberdev.com/get_example.php3?count=3577

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Charles Kline [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2003 7:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] stripping newlines from a string


Hi all,

How would i go about stripping all newlines from a string?

Thanks,
Charles


-- 
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] status of current online users

2003-06-08 Thread Boaz Yahav
Display Users Online Based On Page Viewing
http://articles.weberdev.com/ViewArticle.php3?ArticleID=254

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Miranda, Joel Louie M [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 09, 2003 7:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP] status of current online users


Hello,

I was wondering how did some people do that they can display current
active users on a webpage? I was hoping to find even simple info about
this even on a first site basis only. Any ideas and howto's/docs will be
great.

Thanks,
Louie

-- 
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] please help, simple problem (i think)

2003-06-07 Thread Boaz Yahav
This was just an example :)

You can do :

id : $row->type "; 
}
?>

You can reuse $result if you need to or you can just assign it all to a
variable and dump it multiple times
down the page... up to you

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Ryan A [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2003 9:13 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] please help, simple problem (i think)


Hi,
I dont have packageName therejust id,type

Plus i need to do this in 2 placesso if i could assign each counts
result  to a variable...it would be reay easy.

Cheers,
-Ryan

- Original Message -----
From: "Boaz Yahav" <[EMAIL PROTECTED]>
To: "Ryan A" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 07, 2003 8:11 PM
Subject: RE: [PHP] please help, simple problem (i think)


> I guess you mean something like :
>
>  $result=mysql_query("Select PackageName FROM Packages ORDER BY
> PackageName") or die(mysql_error());
> While($row = mysql_fetch_object($result)) { Echo"$row->PackageName 
> "; }
> ?>
>
>
> Sincerely
>
> berber
>
> Visit http://www.weberdev.com/ Today!!!
> To see where PHP might take you tomorrow.
>
> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 9:06 PM
> To: Boaz Yahav
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] please help, simple problem (i think)
>
>
> Hi,
> Basically I am offering some packages and I want to say:
>
>
> These are the following packages with your account:
> package1 (-$row1-)
> package2 (-$row2-)
> package3 (-$row3-)
> package4 (-$row4-)
> package5 (-$row5-)
>
>
> how to do it?
>
> Thanks,
> -Ryan
>
>
> > Maybe you should tell us what you really want to do? Usually you 
> > don't just assign a row value to a variable.
> >
> > Sincerely
> >
> > berber
> >
> > Visit http://www.weberdev.com/ Today!!!
> > To see where PHP might take you tomorrow.
> >
> >
> > -Original Message-
> > From: Ryan A [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, June 07, 2003 8:54 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] please help, simple problem (i think)
> >
> >
> > Hi,
> > Feeling a little braindead, please help.
> > The below program as you can see is extremly simple,
> > it connects to the database and runs a select (COUNT) query, this 
> > query will return 5 rows...so far so good, everything is working but

> > I
>
> > have no idea how to assign each of the rows to a variable so I can 
> > use
>
> > it... something like: $one=$row[1]; $two=$row[2]; $thr=$row[3];
> >
> > heres the code:
> >
> >  > require "configbwh.php";
> >
> > $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I 
> > cannot connect to the database because: ' . mysql_error()); 
> > mysql_select_db ("$db");
> >
> > $tt = "SELECT ptype, count(*) FROM mylist WHERE ptype IN ('1', '2', 
> > '3',
> > '4','5') GROUP BY ptype";
> >
> > if($res= mysql_query($tt))
> > {
> > while($row = mysql_fetch_row($res))
> >  {
> > print($row[1]);
> >  }
> > }
> > ?>
> >
> > Cheers,
> > -Ryan
> >
> >
> > --
> > 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
>
>


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



RE: [PHP] please help, simple problem (i think)

2003-06-07 Thread Boaz Yahav
I guess you mean something like : 

PackageName ";
}
?>


Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-Original Message-
From: Ryan A [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2003 9:06 PM
To: Boaz Yahav
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] please help, simple problem (i think)


Hi,
Basically I am offering some packages and I want to say:


These are the following packages with your account:
package1 (-$row1-)
package2 (-$row2-)
package3 (-$row3-)
package4 (-$row4-)
package5 (-$row5-)


how to do it?

Thanks,
-Ryan


> Maybe you should tell us what you really want to do?
> Usually you don't just assign a row value to a variable.
> 
> Sincerely
> 
> berber
> 
> Visit http://www.weberdev.com/ Today!!!
> To see where PHP might take you tomorrow.
> 
> 
> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 07, 2003 8:54 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] please help, simple problem (i think)
> 
> 
> Hi,
> Feeling a little braindead, please help.
> The below program as you can see is extremly simple,
> it connects to the database and runs a select (COUNT) query, this 
> query will return 5 rows...so far so good, everything is working but I

> have no idea how to assign each of the rows to a variable so I can use

> it... something like: $one=$row[1]; $two=$row[2]; $thr=$row[3];
> 
> heres the code:
> 
>  require "configbwh.php";
> 
> $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I 
> cannot connect to the database because: ' . mysql_error()); 
> mysql_select_db ("$db");
> 
> $tt = "SELECT ptype, count(*) FROM mylist WHERE ptype IN ('1', '2', 
> '3',
> '4','5') GROUP BY ptype";
> 
> if($res= mysql_query($tt))
> {
> while($row = mysql_fetch_row($res))
>  {
> print($row[1]);
>  }
> }
> ?>
> 
> Cheers,
> -Ryan
> 
> 
> --
> 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] Re: REDIRECT

2003-06-07 Thread Boaz Yahav
To save you the search : 

How to use META REFRESH to auto refresh an html page after x seconds.
http://examples.weberdev.com/get_example.php3?count=124

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.



-Original Message-
From: Bobby Patel [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2003 9:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: REDIRECT


not with php directly, but you can do that with HTML meta tags, check
google for "Meta refresh"


"Dale" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Does anybody know of a way to redirect to another page once you have
already
> outputted html to the screen. In other words, I want to output some 
> text
to
> the screen for 10 secs and then re-direct to another page.
>
> Thanks,
> Dale
>
>



-- 
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] Page loading time

2003-06-07 Thread Boaz Yahav
The time that a page takes to load is a client side issue.
Your php script can be done but the web server may still be sending
information such as
heavy graphics and such to the client.

There are applications that let you measure the time a site and all of
it's
parts take to load as well as view the headers, sizes of objects and
much more.

I'm working with TracePlus Web Detective :
http://www.sstinc.com/webanal.html

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-Original Message-
From: Adrian Teasdale [mailto:[EMAIL PROTECTED] 
Sent: Saturday, June 07, 2003 9:50 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Page loading time


Hi

What is the easiest way to find out how long a page takes to load? I
have a client that is concerned about how long the pages are taking and
I want to find some way of analysing it.  Is there a PHP script that can
do this?

Ade


-- 
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] cookies and iexplorer

2003-06-06 Thread Boaz Yahav
I'm not sure what you are trying to do but what reason can you possibly have to store 
the password of a user in his cookie?
Usually the username is also not something you need in the cookie.

Are you sure the cookies are set at all?
can you show some code? specially the one you set the cookies with?
Also, is there any chance that the cookies are set on a different domain than the one 
you are in (e.g., you are using an IFRAME or something?)

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.

-Original Message-
From: Omar [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2003 8:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] cookies and iexplorer


I have this login page, if the login is correct, i create 3 cookies:
 - user = $login
 - password = $pass
 - seepage = 1

on the other pages, i placed a condition:
if $seepage != 1
  go to login page
else
  show page

It works fine to some people (works fine for me), but there are other people who can´t 
see a page with the condition. We tryed changin the security leven on the browser 
(internet explorer 5.x & 6), and lots of other related things, but they still can´t 
see the page. Do you have any advice? I don't have a clue about what could be wrong 
with these people.

Thank you.



-- 
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] Administration packages

2003-06-06 Thread Boaz Yahav
I think you meant http://phpclasses.org and not http://phpclasses.com

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 4:36 AM
To: christian calloway; [EMAIL PROTECTED]
Subject: Re: [PHP] Administration packages


I've built my own framework over time, and would highly recommend it,
because you get exactly what you want.

but here's a few things that might help:

- some sort of form building/validating class (10's or 100's even at
phpclasses.com)

- read up on some of the large app frameworks... fusebox comes to mind
here, but i'm sure there are others.  also look at some large opensource
products built in php (postnuke?, phpbb?, etc).  i'm not saying you will
borrow or use what they have at all, but their logic and ideas may rub
off on you


Without knowing EXACTLY what you want to automate, I can't really say
much more.


Justin


on 04/06/03 1:13 PM, christian calloway ([EMAIL PROTECTED]) wrote:

> Hey everyone,
> 
> I find myself building alot of admin control areas, or in otherwords, 
> a group of forms that lets an end user control data and appearances of

> his/her site. What I am looking for is a package of classes/functions 
> that will help me automate and modularize this process a little more. 
> I am not looking for a "complete system", just a framework from which 
> I can build. Thanks alot,
> 
> Christian
> 
> 


-- 
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] PHP - File Edit

2003-06-06 Thread Boaz Yahav
Maybe this can help :

A simple configuration file editor to ease you life in setting up php
applications. Reads variables from a given file automatically and
displays current value. New value will be written to file after submit.
http://examples.weberdev.com/get_example.php3?count=1741

or

EditPHP - PHP HTML online file editor with encrypted password
authentication
http://examples.weberdev.com/get_example.php3?count=1496

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Matt Zur [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 06, 2003 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP - File Edit


Does anyone know of a simple program that will let me specify a file 
within a certain directory to load into a textarea field, let me make 
changes, then export/replace that file with the changed contents?

I tried writing one myself in PHP, but I ran into a problem with quotes.

If I had tags in in the text area e.g.   it would 
mess up the quotes by adding back slashes etc.

TIA,

-Matt
-- 
Matt Zur
[EMAIL PROTECTED]
http://www.zurnet.com

Need a Web Site??? - Visit... www.zurnet.com

1997 - 2003 - 6th Anniversary!!!


-- 
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] PHP magazines / websites?

2003-04-04 Thread Boaz Yahav
http://www.weberdev.com is one of the veteran sites and is definitely a
premier PHP developer website.

Also check out :

http://www.phpclasses.org
http://www.codewalkers.com

berber



-Original Message-
From: John M. Calvert [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 9:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP magazines / websites?


Hi, I'm wondering what PHP-focused or PHP-aware print magazines are out
there (as opposed to on-line). So far I'm aware of www.phparch.com, but
I've not picked up a copy yet.

Also, what are considered the premier PHP developer websites?

Thanks

John M. Calvert, M.Sc., MCSD

1310521 Ontario Inc.
49 Belmont Ave.
Ottawa ON K1S 0V2
(613) 730-9851
http://members.rogers.com/john-m-calvert/

-- 
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] Storing a graphic file in a MySQL database

2003-03-29 Thread Boaz Yahav
Saving Images in MySQL
http://www.weberdev.com/index.php3?GoTo=ViewArticle.php3?ArticleID=3

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.



-Original Message-
From: Phil Schwarzmann [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 29, 2003 3:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Storing a graphic file in a MySQL database


Where can I find some information on storing a graphic file such as a
JPG or GIF into a MySQL database.  I'm assuming I have to convert it to
a binary format and store it that way.  Or maybe this isn't possible?

 

Thanks!


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



RE: [PHP] substr() on part an ereg() capture

2003-03-25 Thread Boaz Yahav
Looks like this one :
http://examples.weberdev.com/get_example.php3?count=1567
so if someone manages to get this done, i would appreciate it if he can
add a comment.

thanks

berber

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 25, 2003 3:24 PM
To: php
Subject: [PHP] substr() on part an ereg() capture


Hi, I have this ereg to turn URLs into links:

eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])", "\\1://\\2\\3", $str);

... found it in the manual i think, or maybe on weberdev.com examples


Anyhoo, it places the whole link in between the  and , which
is fine for short links, but on longer links (in my case, around 60+
chars), it messes with my table or CSS layout.

So, I'd like to subtr() the 2nd capture part down to 55 chars or
something IF it's longer than 60, and append a ... to it.

ANY ideas on how this is done?  Or is this beyond regexp??


TIA

Justin


-- 
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] Increase a month

2003-03-21 Thread Boaz Yahav
This can help : 

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3541

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: shaun [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2003 4:00 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Increase a month


Hi,

could someone tell me why this:

";
   $month = $month + 1;
   echo "\$month: ".date(F,strtotime($month))."";
?>

outputs this:

$month: March
$month: March

surely it should be:

$month: March
$month: April

Thanks in advance for your help.



-- 
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] Search "engine"

2003-03-21 Thread Boaz Yahav
Check out : 


http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1047

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3570

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3094

http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1340

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 21, 2003 8:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Search "engine"


Dose any one have any tips on making a very simple search engine, that
only searches in two fields of a mysql table. I just need some pointers
to know where to begin.
 
Thanks, David

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



RE: [PHP] Banner ad solution?

2003-03-20 Thread Boaz Yahav
Proved to be very stable for me :)

-Original Message-
From: MIKE YRABEDRA [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2003 7:00 PM
To: PHP List
Subject: [PHP] Banner ad solution?




Can someone suggest a 'good' banner ad solution that is done in php.

Please do not suggest phpAdNews since it has proven very unstable for me
and others.


-- 
Mike Yrabedra
President

 323, Inc.
 Home of The MacDock and The MacSurfshop
 [http://macdock.com] : [http://macsurfshop.com]
 VOICE: 770.382.1195
 FAX:   734-448-5164
 iChat/AIM: ichatmacdock
___
"Whatever you do, work at it with all your heart,
as working for the Lord, not for men."
~Colossians 3:23 <{{{><
--



-- 
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] Zero Fill -> Number Format

2003-03-20 Thread Boaz Yahav
wouldn't this just print empty spaces before the number instead of the
needed Zeros?

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2003 1:11 AM
To: 'Harry.de'; [EMAIL PROTECTED]
Subject: RE: [PHP] Zero Fill -> Number Format


sprintf/printf("%7d", $num)

-Original Message-
From: Harry.de [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Zero Fill -> Number Format


How can I put out a Zero Fill for numbers
The result should be

$something=26;
echo $something;

e.g.
026

I didn't found a solution with number format. Is there any other way?



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


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



RE: [PHP] form/text area input problem

2003-03-14 Thread Boaz Yahav
Did you play with 



or



Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.



-Original Message-
From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2003 6:25 PM
To: '- Edwin'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [PHP] form/text area input problem


THanks guys, I think I will use wordwarp()



-Original Message-
From: - Edwin [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2003 11:07 AM
To: Poon, Kelvin (Infomart); '[EMAIL PROTECTED]'
Subject: Re: [PHP] form/text area input problem


"Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> wrote: 
[snip]
> the problem is when I display it it would be a one lined paragraph.   
> THe page's format is ruin since this is one long line and the user
> will have to scroll across to read the paragraph which look pretty
bad.
> 
> I hope you know what i am trying to say.
[/snip]

Hmm, I guess I know what you're trying to say but *that* is NOT the 
normal behaviour (if I may say). Putting one long paragraph inside
 tags "should" automagically wrap it... If not, you can probably 
use CSS to limit the width of your 's (paragraphs) so it wouldn't

destroy the "format" of your page.

- E

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!  http://bb.yahoo.co.jp/

-- 
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] [RegExp] extracting anchors

2003-03-13 Thread Boaz Yahav
Try these two :

A function that parses a string and replaces http://whatever with a
link, and email addresses with a mailto link. 
This function was designed for the motd package. But will work freely on
its own. 
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1235

How to change all of the links in a string to be HTML links.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1567


Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Jens Lehmann [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 12, 2003 11:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [RegExp] extracting anchors


Hello,

I want to extract the "name"-attribute of all anchors out of an 
HTML-source-code which don't have the "href"-attribute. I can use this 
code to get the "name"-attribute:

preg_match_all('/]*?)name=[ \'\"](.*?)[ \'\"](.*?)>/is',$src,$ar);

The name-attributes are now in $ar[2]. How can I exclude all links which

have the href-attribute? I didn't find an easy way how to say that a 
string must _not_ be part of a pattern match. I hope you can give me 
some advise.

Jens


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



[PHP] Script Nane in CGI mode

2003-03-13 Thread Boaz Yahav
Hi

When you want to know the name of the script you are running you can use
: $SCRIPT_NAME.
However, this info is not available when running a PHP script in CGI
mode.

If i have a fine called berber1.php and a link to this file called
berber2.php, how can i know in the code
if it has been called from berber1.php or berber2.php?

thanks

berber

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



RE: [PHP] Char check

2003-03-12 Thread Boaz Yahav
Maybe this can help

Check int / integer - checking if a variable is an integer or not. The
php is_int() function does not check if the string value is integer or
not.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1705

How to check if a string has only specific characters? 
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1328


Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Fredrik [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 13, 2003 2:39 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Char check


Hi

I want to check if  $var is a char or an int.

Freddy



-- 
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] Automatically Save Image?

2003-03-10 Thread Boaz Yahav
How to let a user download a picture by clicking on it instead of
needing to right click and Save-As.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1562

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Doug Coning [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 05, 2003 1:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Automatically Save Image?


Hi,

I'm developing a flash site that uses PHP and MySQL to pull in images.
My client would like to have a button in flash underneath the images he
has shown that would enable the viewer to download the images to their
own harddrive.

I know I could set it up to open the picture in a new window and have
the viewer 'right' click on it and select Save.  But is there anyway to
automate this so that Flash would open the URL that would automatically
open the "Save Picture" window for saving to the person's harddrive?

Thanks,

Doug Coning




-- 
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] .htpasswd and PayPal generated passwords

2003-03-01 Thread Boaz Yahav
Check out :

Authenticating against .htpasswd style files.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=109

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Rob Packer [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 15, 2003 6:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] .htpasswd and PayPal generated passwords


I use PayPal to generate a username and password and then write them
to the .htpasswd file. If I were to switch to using a database (because
.htaccess seems to always prompt twice!) how would I perform the
comparison for the passwords? It would seem that everytime you generate
an encrypted password it's different. So how would you compare them?
Also, does anyone know what the encryption method used by PayPal is?

Thanks for any help...

Robert Packer



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



[PHP] Context

2003-01-30 Thread Boaz Yahav
HI

I was reading this article : http://www.devarticles.com/art/1/397/2
And am a bit confused now.

If I understand correctly, the author claims that :

 
Combining HTML output and 
 
tags really wastes my time. 

Runs "slightly" faster than 

 


IS this true?
Is echo more consuming than entering and exiting in and out of context?

berber



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




RE: [PHP] Credit Card Validation

2002-09-08 Thread Boaz Yahav

Check Out

Credit Card validation routine. Uses MOD 10 to check if credit card
number is valid.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=74

Validating Credit Card Numbers Without Bank Involvement 
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=333

A set of functions to check the validity of a credit card number.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=458

After discovering some credit card validation routines didn't work -
here is one that I found works with all the numbers I have tried so far
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=505

Validation function for LUHNMod10 and variant. Can discriminate credit
card numbers of varying lengths. Uses [Double >> Sum-of-Digits]
transform.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1463

Credit Card Identification and Validation Class - The credit card class
provides methods for cleaning, validating and identifying the type of
credit card numbers.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1805

Real-Time Transaction Processing PHP Class. Credit Cards & Checks.
Supports system check, address verification, authorization and deposit,
deposit, credit, commercial card, electronic check debit, and more.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3107

ECHO-PHP Class Real Time Transaction Processor v1.4.4 for Credit Cards
and Checks / ACH
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3190

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.



-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, September 07, 2002 11:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Credit Card Validation


I know it's been posted here several times and I've looked through the
archives but I just need something very simple for this. I have a form
that already takes in user information but now before accepting the
information, I'd like to pass the credit card information to a function
and return true or false.

Is anyone using something like this that is simple?

Jeff

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




RE: [PHP] PHP & MySQL & Apache on Linux vs. Solaris

2002-09-05 Thread Boaz Yahav

I'm using 3.23.52-log

-Original Message-
From: Adam Williams [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 05, 2002 3:22 PM
To: Boaz Yahav
Cc: PHP General (E-mail)
Subject: Re: [PHP] PHP & MySQL & Apache on Linux vs. Solaris


Go to www.mysql.com and make sure you are using the latest version of
MySQL.

Adam

On Thu, 5 Sep 2002, Boaz Yahav wrote:

> Hi
>
> Since i moved from a Sun / Solaris Machine to a Compaq / Linux machine

> I'm having weird problems with MySQL crashing while running reports 
> written in php.
>
> The site is amazingly fast now on the Linux server but running a 
> report that locks the main tables for about 20 seconds raises the load

> and crashes the server.
>
> While this makes some sense (maybe) i did not have this while i was on

> Solaris. Why would Solaris know how to hold the queries in the Queue 
> till the tables are freed and Linux does not?
>
> Is this PHP, MySQL or maybe Linux to blame?
>
> thanks
>
> berber
>


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




[PHP] PHP & MySQL & Apache on Linux vs. Solaris

2002-09-05 Thread Boaz Yahav

Hi
 
Since i moved from a Sun / Solaris Machine to a Compaq / Linux machine
I'm having weird problems with MySQL crashing while running reports written
in php.
 
The site is amazingly fast now on the Linux server but running a report
that locks the main tables for about 20 seconds raises the load and crashes
the server.
 
While this makes some sense (maybe) i did not have this while i was on Solaris.
Why would Solaris know how to hold the queries in the Queue till the tables are freed
and Linux does not?
 
Is this PHP, MySQL or maybe Linux to blame?
 
thanks
 
berber



RE: [PHP] getting anchor tags

2002-06-21 Thread Boaz Yahav

This looks like a great example to add to weberdev. If you get this
working,
would you care to spend 3 minutes and let other PHP developers enjoy
from 
your experience?

You are one click away from doing a good deed :)

http://www.weberdev.com/index.php3?GoTo=addexample.php3

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.

-Original Message-
From: Nick Wilson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, June 21, 2002 11:15 PM
To: php-general
Subject: [PHP] getting anchor tags


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi
In theory I can work out how to get 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




[PHP] pconnect

2002-05-25 Thread Boaz Yahav

Hi

When working with pconnect. Can it be that each http process of apache will have more 
than
one sql connection open at a time?

I'm working with pconnect and seeing about double the number of established sql 
connections 
than the established http processes.

any ideas?

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.



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




RE: [PHP] PHP & PGP

2002-05-23 Thread Boaz Yahav

This is not what I need.
I'm not building a userbase to authenticate with.

I'm holding a database of users and passwords that I need to keep.
There is no authentication done against these user/password pairs.

I don't want to keep the passwords in free text since if someone breaks in, 
he can steel many users and passwords.

What I want to do, is encrypt each password with another password.
and be able to decrypt the string with the same pass that was used
to encrypt to show the original plain text pass two who ever needs
to see it.

thanks

berber

-Original Message-
From: John Horton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 22, 2002 5:49 PM
To: Boaz Yahav; PHP General (E-mail)
Subject: RE: [PHP] PHP & PGP


calculate a hash of the pass the user enters and store that. When the user
enters a pass again to get the data, then hash this pass and see if it
matches the stored hash. If it does , then send the user the data.
create a table that stores username, and hashed passwords for
authentication.
HTH

-Original Message-----
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: 22 May 2002 17:43
To: PHP General (E-mail)
Subject: [PHP] PHP & PGP


Hi
 
I need to encrypt some fields in my mysql database.
I need to ask a user for a pass when he enters the data, encrypt it and show
him the data only if he enters 
the pass again.
 
I know that pgp has a module that works with passwords instead of keys. I
never tried this on Linux though.
 
Any help will be appreciated.
 
thanks
 
berber
 


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




[PHP] PHP & PGP

2002-05-22 Thread Boaz Yahav

Hi
 
I need to encrypt some fields in my mysql database.
I need to ask a user for a pass when he enters the data, encrypt it and show him the 
data only if he enters 
the pass again.
 
I know that pgp has a module that works with passwords instead of keys. I never tried 
this on Linux though.
 
Any help will be appreciated.
 
thanks
 
berber
 



[PHP] error_reporting()

2002-04-30 Thread Boaz Yahav

Hi
 
This function keeps amazing me.
What is the highest possible value that i can give it to show all
possible errors / warnings etc...?
 
Thanks
 
berber
 



[PHP] RegEx and ?

2002-04-24 Thread Boaz Yahav

When i try to use preg_match on strings that have "?" inside them it
seems to not work.
Any ideas how to bypass this?
 
thanks
 
berber



[PHP] Passing Arrays

2002-04-22 Thread Boaz Yahav

Suppose i have a multiple select posted to a script by a form.
now i have to send this array again with a new form to a new
script.
 
How do i do this?
 
thanks
 
berber



RE: [PHP] Open Download-Box

2002-04-21 Thread Boaz Yahav

How to force the user to download a file instead of opening it up in an
controlled environment within the browser (i.e. MS Word/Adobe Acrobat)
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1627

How to let a user download a picture by clicking on it instead of
needing to right click and Save-As.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1562

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.


-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 3:20 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Open Download-Box


Hello! I have a PDF-File, which the user should download (it should not
open in the browser, even if the Adobe-Reader-Pluging is installed). I
use:

 $filename = $DOCUMENT_ROOT."/".$QUERY_STRING;
 $fd = fopen ($filename, "rb");
 $contents = fread ($fd, filesize ($filename));
 fclose ($fd);

 header("Content-type: application/octet-stream");
 header("Content-Disposition:attachment;filename=$savename");

 echo $contents;

This doesn't work in IE (Version 6, 5 is not tested yet): When I get the
download-box and I choose "open" instead of "save", the download-box
opens again! Then pressing "open", everything is okay, but why is the
box opened twice?

Martin



-- 
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] mail() + attachment

2002-04-21 Thread Boaz Yahav

Class for sending mail with MIME attachments in multipart format using
external send mail, mime code and zip
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=336

Class to send a file as an attachment with the php mail() function.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1583

How-to send e-mail with attachments ( with some corrections ) 
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1260

Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.



-Original Message-
From: Wolf-Dietrich von Loeffelholz [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 20, 2002 10:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mail() + attachement


Is it possible to send with mail an attachment .. if yes, how ???

Greetings
wolf


-- 
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] Learning PHP

2002-04-20 Thread Boaz Yahav

http://www.weberdev.com

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: Victor Javier Martinez Lopez [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 20, 2002 3:41 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Learning PHP


I'm started with PHP and I'm interested in find any place
with some docs and example code. Can anyone help me?

Thanks in advance.


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




[PHP] PHP & HTML Issue

2002-04-16 Thread Boaz Yahav

> Hi
> 
> I'm having a problem that is taking me out of my mind.
> I have a DISABLED field in my HTML ( tag) and for some reason,
> it's value is not passed back to the script after submission.
> If I remove the DISABLED word it's ok. 
> 
> The funny issue is that with Netscape it's ok but IE is acting up.
> 
any ideas?

> Sincerely
> 
>   berber
> 
> Visit http://www.weberdev.com Today!!! 
> To see where PHP might take you tomorrow.
> 

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




RE: [PHP] Detecting language

2002-04-15 Thread Boaz Yahav

In case anyone is interested

Function IsHebrew($string) {
If(ereg('[?-?]',$string,$regs)) {
Echo"Hebrew";
}Else{
Echo"English";
}
}

Not everyone can see the [?-?]. In any case this can be good for any
language

berber


-----Original Message-
From: Boaz Yahav 
Sent: Monday, April 15, 2002 8:44 PM
To: PHP General (E-mail)
Subject: [PHP] Detecting language


Hi

I have an application that works with two languages. I'm trying to write
a function that will tell me if a string
contains only English or also chars from the other language. It's enough
that there is one char of a different 
language to make the function return a true value.

I guess I'm not inventing the wheel here...


Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


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




[PHP] Detecting language

2002-04-15 Thread Boaz Yahav

Hi

I have an application that works with two languages. I'm trying to write
a function that will tell me if a string
contains only English or also chars from the other language. It's enough
that there is one char of a different 
language to make the function return a true value.

I guess I'm not inventing the wheel here...


Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


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




[PHP] Optimizing Indexes and such in MySQL

2002-04-15 Thread Boaz Yahav

I'm interested to know how people keep their MySQL tables up-to-date on
a regular basis.
what is the methodology used to keep up indexes up to date and tables
optimized etc...
 
thanks
 
berber

 




RE: [PHP] Dynamic Web Navigation

2002-03-30 Thread Boaz Yahav

http://www.weberdev.com
Check out the Articles / Tutorials

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: Omland Christopher m [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 6:43 PM
To: Daniel Negron/KBE
Cc: [EMAIL PROTECTED]
Subject: [PHP] Dynamic Web Navigation


Does anyone have a good link to a tutorial, or a book suggestion that
will
help me learn more about making dynamic web pages with MySQL/PHP. Mainly
things like loading navigation menues, and pics and what not?
Thanks.
-Chris



-- 
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] banner ads

2002-03-30 Thread Boaz Yahav

What about phpAdsNew?
http://www.phpadsnew.com

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: tom hilton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 11:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] banner ads


Hi, does anyone know of a simple banner ad rotation script that can
rotate
animated gifs.



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




[PHP] Has anyone written such a function?

2002-03-30 Thread Boaz Yahav

Hi

I need a function that will get a date in the past and return how much
time has passed since that date till now.
The input to the function is a MySQL DATETIME format and the output
should be something like :

2 Years, 36 Days, 7 hours , 25 minutes 

I would write it but I'm pretty sure it has been done.

thanks

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


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




RE: [PHP] Creating forums in php

2002-03-28 Thread Boaz Yahav

http://www.phorum.org ?

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 3:32 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Creating forums in php


Hello friends,

I am running a website having php and mysql support on which I want to
set
up a discussions forum. Can someone advise me any web resources for
building
a php-mysql forum?

Thanks
denis


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




[PHP] New Chat interface on weberdev to the #PHP channel

2002-03-25 Thread Boaz Yahav

Hi
 
One of the ways to get PHP support is from IRC channels that exist for
this purpose (you can see them listed on http://www.php.net).
If you don't have a way to connect to the IRC servers for any reason, or
just prefer a web based client, try the ActiveX client (assuming you are
using IE) 
on  http://www.weberdev.com. The chat is accessed from the left menu.
 
P.S. I suggest you stick to PHP and don't mention the word ActiveX on
that channel since the people there have a VERY
short temper and love to kick others out :), specially if they say words
that are not PHP / UNIX related...
 
Enjoy
 
Sincerely

berber

Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.




RE: [PHP] Re: Delete Confirmation

2002-03-22 Thread Boaz Yahav

Do that with JavaScript

Using JavaScript to show an OK/Cancel confirmation window
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1364

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 6:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Delete Confirmation



Actually I have that working fine.  I was just looking to add to the
code a
confirmation box of some sort.  either typing in YES or clicking a YES
NO
BOX.

Thanks for your post.

**DAN**


 

Matt Wallace

cc:

 Subject: [PHP] Re: Delete
Confirmation 
03/20/2002

11:03 AM

 

 





Daniel Negron/Kbe wrote:

> Does anyone have examples of record deletions from php to mysql


Could you be more specific?

$sql = "DELETE from tablename where tablename_idx = $index";
$result = mysql_query($sql);

would be a very simple example of deleting a record from a hypothetical
database with php, but I'm not sure if that's what you were really
asking.





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


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




RE: [PHP] Weird fsockopen behavior - SOLUTION

2002-03-22 Thread Boaz Yahav

I feel pretty sheepish but it always happens to me. I found this note in
the manual and it seems to solve the problem.
So if anyone has this problem.

berber



User Contributed Notes
fsockopen   
[EMAIL PROTECTED]
08-Jan-2002 06:30 
 
This is a "gotcha" that "got me" and discusses the
careful use of HTTP/1.1 over HTTP/1.0
 
I had a script that suffered dreadful performance and return Hex values
amongst the correct data. This was eventually traced to my inclusion of
HTTP/1.1 in the line which read:

-- CODE (watch wrap) --
  $request = "GET $document" . "?" .
"$query" . " HTTP/1.1\r\n";
  $request .= "Host: $myServer\r\n\r\n";
-- CODE --

By sending a HTTP/1.1 request it declares that it is willing to 'speak'
HTTP/1.1, of course, but there are some aspects of HTTP/1.1 that make it
necessary to handle the socket differently from HTTP/1.0. 

In the RFC 2616, Section 3.6 defines:

[...]
All HTTP/1.1 applications MUST be able to receive and decode the
"chunked" transfer-coding,
[...]

This was the cause of the extraneous HEX values being displayed.

Regards the loss of performance, this is also due to using HTTP/1.1,
which
defaults to having keepalive on until you tell it to close the
connection,
or it times out. Therefore the socket was being kept open by the script.

Simply changing the line in the script to HTTP/1.0 completely fixed the
problem.

Speaking with one of the members in PHP-dev his words were:

[Comment from Hartmut Holzgraefe]
"I stumbled over the same 'chunked' problem not to long ago as a rule
of thumb: never use HTTP/1.1 unless you really know that you have to,
claiming to be a HTTP/1.0 client is no problem."

I have posted this as it was something I found very difficult to debug
as
there is actually nothing wrong with the script. This sort of problem
often requires an in depth knowledge of an area that most developers
would
not have or consider. I would doubt that many, in any, who are reading
this have ever read the HTTP RFC 2616 (I doubt also that it is a
rivetting
read :))  I hope this helps any future developers who are considering
the
use of high level socket connections with HTTP/1.1.
 
 

-Original Message-
From: Boaz Yahav 
Sent: Friday, March 22, 2002 5:49 PM
To: PHP General (E-mail)
Subject: [PHP] Weird fsockopen behavior


Hi

I'm using 

$fp=fsockopen($URL,80, &$errno, &$errstr,10); 
set_socket_blocking($fp,false);

to get the HTML from a remote site and monitor how long it took me to DL
the HTML.

The next lines are like this :

if ($fp) {
$SendGetStart = getmicrotime();
fwrite($fp,"GET / HTTP/1.1\r\n");
fwrite($fp,"Accept: */*\r\n");
fwrite($fp,"Accept-Language: en-us\r\n");
fwrite($fp,"Proxy-Connection: Keep-Alive\r\n");
fwrite($fp,"User-Agent: Mozilla/4.0 (compatible; MSIE 5.5;
Windows NT 5.0; COM+ 1.0.2204)\r\n");
fwrite($fp,"Host:$Host\r\n\r\n");

..

While(!feof($fp)) {...


The weird thing is that it seems the EOF comes in great delay. When I
print the HTML I get from the remote site, the while loop continues for
about 10-15 seconds after the last  tag arrived. This is for any
site I check so it's not something specific to the web server I'm
testing. 

Anyone has any idea why?

Thanks

berber

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




[PHP] Weird fsockopen behavior

2002-03-22 Thread Boaz Yahav

Hi

I'm using 

$fp=fsockopen($URL,80, &$errno, &$errstr,10); 
set_socket_blocking($fp,false);

to get the HTML from a remote site and monitor how long it took me to DL
the HTML.

The next lines are like this :

if ($fp) {
$SendGetStart = getmicrotime();
fwrite($fp,"GET / HTTP/1.1\r\n");
fwrite($fp,"Accept: */*\r\n");
fwrite($fp,"Accept-Language: en-us\r\n");
fwrite($fp,"Proxy-Connection: Keep-Alive\r\n");
fwrite($fp,"User-Agent: Mozilla/4.0 (compatible; MSIE 5.5;
Windows NT 5.0; COM+ 1.0.2204)\r\n");
fwrite($fp,"Host:$Host\r\n\r\n");

..

While(!feof($fp)) {...


The weird thing is that it seems the EOF comes in great delay. When I
print the HTML I get from the remote site, the while loop continues for
about 10-15 seconds after the last  tag arrived. This is for any
site I check so it's not something specific to the web server I'm
testing. 

Anyone has any idea why?

Thanks

berber

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




RE: [PHP] passing large quantities of form data

2002-03-06 Thread Boaz Yahav

Why not split the form into several  tags where only one of them is
visible at a time.
A "Next" button will move the users to the next part of the form (Next
). and a Previous
button will allow them to go back to the previous part of the form and
fix anything they like.
This way, you only actually submit once.

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.



-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 5:34 PM
To: PHP
Subject: [PHP] passing large quantities of form data



I have a huge form that takes place over several pages.  Well, actually 
it's one script that calls itself many times.  Passing the user data 
from one instance of the script to another has certainly been 
educational.  (I am avoiding session variables for this particular 
form.)  I finally have the data display itself in a "Confirm?" page 
instance, where all of the data aggregated is displayed for the user to 
confirm.  But I need to pass this data ONE MORE TIME to the part of the 
script that actually adds it to the database.

Two questions about this:

1) most important question -- what is the most efficient way to pass 
this POST data from the "confirm" page to the "add to database" page?  I

was thinking of creating an array to contain the many POST variables, 
like this:

$superformfield = array();
$superformfield[] = $_POST['name'];
$superformfield[] = $_POST['size'];
$superformfield[] = $_POST['resolution'];
$superformfield[] = $_POST['creator'];
... etc ...

Then taking $superform and placing it into a hidden form field, rather 
than creating a new hidden form field for every single variable that I 
want to pass.  Is this when people use serialize() ?  Demetrious S. 
Kelly posted a function "encode()" which takes data and translates it to

ASCII numbers so that it becomes hidden-form-field-friendly.  I'm 
guessing the best thing to do is serialize() the data, then translate it

into ASCII numbers only, then store all of this info into one giant 
hidden form field.  I'm hoping there's no limit on hidden form field 
size... then use Demetrious's decode() function on the next 
instance/"page" of the script, to return the data to its original 
characters and unserialize() -ing the characters to get my array back.  
Then I can loop through the array and create my SQL statement.  Does it 
make any sense?

2) is this a lot of extra work, and I'd be better served by just taking 
each variable and putting it into its own hidden form field?

Thanks!

"And remember, your answer is for posterity, so please try to be
honest."
-- the Six-Fingered Man




Erik







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




  1   2   3   >