[PHP] encoding php codes

2007-02-25 Thread Danial Rahmanzadeh
Zend Guard is a good software for encoding php applications. but that's too expensive. I searched for a free encoder software and found PHP Encoder: http://www.freedownloadscenter.com/Web_Authoring/Scripting_Tools/PHP_Encoder.html but i don't know if PHP Encoder is powerful. please tell me if you

Re: [PHP] remote file time -small issue

2007-02-25 Thread Richard Lynch
You can always add a header to your own PHP scripts if you want to maintain that info -- but be aware that you really need to be careful to change it if you expect browsers to get the LATEST version of your data. http://php.net/header You will find, however, that MANY script-driven websites (PHP,

Re: [PHP] how to display images stored in DB

2007-02-25 Thread Kevin Waterson
This one time, at band camp, "Alain Roger" <[EMAIL PROTECTED]> wrote: > Hi, > > i stored all my pictures in my PostgreSQL DB as bytea type. > Now i would like to know how can i display them in my PHP pages ? Here is a little tutorial on the subject, it uses MySQL and PDO but you simply need to c

Re: [PHP] Re: how to display images stored in DB

2007-02-25 Thread Kevin Waterson
This one time, at band camp, zerof <[EMAIL PROTECTED]> wrote: > It is not a good practice to store pictures in DataBases, use links, > instead of. Rubbish, where are your benchmarks? kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb c

Re: [PHP] Store and retrieve photo from PostgreSQL

2007-02-25 Thread Kevin Waterson
This one time, at band camp, "Alain Roger" <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to store and retrieve photo from my DB (PostgreSQL). > However, i do not know how to do it. Good idea, dont listen to those who give you the "you should'nt store images in a database" diatribe. Here is

Re: [PHP] re-config the language of phpmyadmin

2007-02-25 Thread Chris
[EMAIL PROTECTED] wrote: Dear All, How to config ( hard code ) the phpmyadmin of language to "Chinese Charactor Set" ? eg : Big5 Why don't you ask them? http://sourceforge.net/projects/phpmyadmin/ -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (htt

Re: [PHP] Re: input on sessions vs cookies

2007-02-25 Thread Tosca
It's a website where you can reply to news, blogs and other messages and with a forum. On 2/26/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sun, February 25, 2007 6:45 pm, Tosca wrote: > Quote from Fahad Pervaiz <[EMAIL PROTECTED]>: > "To ensure best security use database as well. Store IP,

Re: [PHP] Re: input on sessions vs cookies

2007-02-25 Thread Richard Lynch
On Sun, February 25, 2007 6:45 pm, Tosca wrote: > Quote from Fahad Pervaiz <[EMAIL PROTECTED]>: > "To ensure best security use database as well. Store IP, Session ID, > username, login time. After every few minutes you can re > authenticate the > user against these parameters." > > I have a log

Re: [PHP] Re: input on sessions vs cookies

2007-02-25 Thread Tosca
Quote from Fahad Pervaiz <[EMAIL PROTECTED]>: "To ensure best security use database as well. Store IP, Session ID, username, login time. After every few minutes you can re authenticate the user against these parameters." I have a login system with sessions and a database where I store session I

Re: [PHP] indexing with fopen

2007-02-25 Thread Chris
Miguel Vaz wrote: Hi, I am trying to add a search to the site i am developing but i ran into a bit of a problem. Since the site is mainly dynamic (lots of includes and mysql queries), i thought of building an index table that will contain the insides of all the pages in the sit

Re: [PHP] read file local not remote

2007-02-25 Thread Martin Zvarík
Difference: You don't call file as http://www.myweb.com/ but instead you use the path like c:\some.txt or ../some.txt etc. PHP 5 = echo file_get_contents("some.txt"); PHP 4 = $fp = fopen("some.txt", "r"); echo fread($fp, filesize ("some.txt")); fclose($fp); Another solution

[PHP] Error handling for Memcached PHP Extension

2007-02-25 Thread Cabbar Duzayak
Hi, Before I start, I am not sure whether I should have sent this to Memcached or PHP mailing list. So, for those who are subscribed to both, I apologize. I have started using the PHP extension at http://pecl.php.net/package/memcache for memcached. But, one problem I am having right now is that,

Re: [PHP] Store and retrieve photo from PostgreSQL

2007-02-25 Thread Chris
Alain Roger wrote: Hi, I would like to store and retrieve photo from my DB (PostgreSQL). However, i do not know how to do it. Apart from the usual "you shouldn't really store images in the database" comment, the php site has some examples: To put it in: http://www.php.net/manual/en/function

[PHP] Re: Combining sound files

2007-02-25 Thread Colin Guthrie
tedd wrote: >> If you are using linux I'd just shell out to sox or similar. > > I don't know how to do that. http://uk.php.net/manual/en/ref.exec.php sox is a command line program that you can experiment with on the command line. >From it's man page: NAME SoX - Sound eXchange - The Swis

[PHP] Re: Combining sound files

2007-02-25 Thread tedd
At 9:49 PM + 2/25/07, Colin Guthrie wrote: tedd wrote: Hi gang: I can combine two mp3 sound files together by simply: // load first $file = "a.mp3"; $handle = fopen($file, "rb"); $size = filesize($file); $load = fread($handle, $size); fclose($handle); // load second $file = "

[PHP] read file local not remote

2007-02-25 Thread Joker7
$url =www.mysite.ru/some.txt; $fa = fopen($url,"r"); /* $fa = fsockopen("http://mysite.ru";, 80, &$num_error, &$str_error, 30); if(!$fa) { print "Weather is not available: $str_error ($num_error)\n"; } else { fputs($fa,"GET /some.txt HTTP/1.0\n\n"); $answer=fgets($fa,128); I use the abo

[PHP] Re: indexing with fopen

2007-02-25 Thread Jo�o C�ndido de Souza Neto
You can try to do this: $page=file('index.php?m=1'); By this way your $page will be an array which will have each line of the resolved file in each element. "Miguel Vaz" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > > Hi, > > I am trying to add a search to the site i am de

[PHP] Re: Combining sound files

2007-02-25 Thread Colin Guthrie
tedd wrote: > Hi gang: > > I can combine two mp3 sound files together by simply: > > // load first > > $file = "a.mp3"; > $handle = fopen($file, "rb"); > $size = filesize($file); > $load = fread($handle, $size); > fclose($handle); > > // load second > > $file = "b.mp3"; > $handle = fopen($fil

[PHP] Re: how to retrieve pictures from postgreSQL DB

2007-02-25 Thread Colin Guthrie
tedd wrote: > That's the type of information you should store in your dB along with > the image. +1 Also you probably want to think about adding some cache related headers there too in order to stop web browsers hammering your server all the time. Col -- PHP General Mailing List (http://www.ph

Re: [PHP] how to retrieve pictures from postgreSQL DB

2007-02-25 Thread tedd
At 8:31 PM +0100 2/25/07, Alain Roger wrote: Hi, I previously sent email about process how to retrieve and save pictures in postgreSQL DB. Now i know how to save them in DB, however i would like to know how can i retrieve the pictures and display them without knowing the picture extension ? i m

[PHP] Re: how to display images stored in DB

2007-02-25 Thread tedd
At 3:53 PM -0300 2/25/07, zerof wrote: Alain Roger escreveu: Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- It is not a good practice to store

Re: [PHP] how to display images stored in DB

2007-02-25 Thread tedd
At 7:17 PM +0100 2/25/07, Alain Roger wrote: Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- Alain Alain: I don't know how to extract images from PostgreSQL,

Re: [PHP] Re: how to display images stored in DB

2007-02-25 Thread Dave Goodchild
On 2/25/07, zerof <[EMAIL PROTECTED]> wrote: Alain Roger escreveu: > Hi, > > i stored all my pictures in my PostgreSQL DB as bytea type. > Now i would like to know how can i display them in my PHP pages ? > > where can i find some example ? > > thanks a lot, > -- It is not a good

[PHP] how to retrieve pictures from postgreSQL DB

2007-02-25 Thread Alain Roger
Hi, I previously sent email about process how to retrieve and save pictures in postgreSQL DB. Now i know how to save them in DB, however i would like to know how can i retrieve the pictures and display them without knowing the picture extension ? i mean that in my DB i have GIFs, JPGs pictures.

[PHP] Re: how to display images stored in DB

2007-02-25 Thread zerof
Alain Roger escreveu: Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- It is not a good practice to store pictures in DataBases, use links, inste

[PHP] indexing with fopen

2007-02-25 Thread Miguel Vaz
Hi, I am trying to add a search to the site i am developing but i ran into a bit of a problem. Since the site is mainly dynamic (lots of includes and mysql queries), i thought of building an index table that will contain the insides of all the pages in the site tree. I was thinkin

[PHP] how to display images stored in DB

2007-02-25 Thread Alain Roger
Hi, i stored all my pictures in my PostgreSQL DB as bytea type. Now i would like to know how can i display them in my PHP pages ? where can i find some example ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5

Re: [PHP] Uploading into website directory for Php files

2007-02-25 Thread Edward Vermillion
On Feb 25, 2007, at 11:30 AM, StainOnRug wrote: Hello again.. I recently posted a question about include files.. I appreciate the responses I received but my question wasn’t answered.. its my fault I didn’t explain myself 100%.. I know how to use the include files.. What I am trying to fi

[PHP] Uploading into website directory for Php files

2007-02-25 Thread StainOnRug
Hello again.. I recently posted a question about include files.. I appreciate the responses I received but my question wasn’t answered.. its my fault I didn’t explain myself 100%.. I know how to use the include files.. What I am trying to figure out is. How do I upload the include files into my In

[PHP] Combining sound files

2007-02-25 Thread tedd
Hi gang: I can combine two mp3 sound files together by simply: // load first $file = "a.mp3"; $handle = fopen($file, "rb"); $size = filesize($file); $load = fread($handle, $size); fclose($handle); // load second $file = "b.mp3"; $handle = fopen($file, "rb"); $size = filesize($file); $load .=

[PHP] Store and retrieve photo from PostgreSQL

2007-02-25 Thread Alain Roger
Hi, I would like to store and retrieve photo from my DB (PostgreSQL). However, i do not know how to do it. Where can i find some example ? thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5

[PHP] re-config the language of phpmyadmin

2007-02-25 Thread edwardspl
Dear All, How to config ( hard code ) the phpmyadmin of language to "Chinese Charactor Set" ? eg : Big5 Edward. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] input on sessions vs cookies

2007-02-25 Thread Robert Cummings
On Sat, 2007-02-24 at 20:05 -0800, benifactor wrote: > as of right now, when the user logs in, i have a cookie storing username... > then on all of the pages i need data i have it query the database and using > the cookie data to retrieve user information.. is there a more secure way to > do this?

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Sancar Saran
Hi, If you able to access memcached. Use memcached. Put your shopping chart items, rendered html items in memcached. It was MUCH faster solution... Regards Sancar On Sunday 25 February 2007 13:59, Martin Zvarík wrote: > This benchmark is not very accurate, but you are right the database > con

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
This benchmark is not very accurate, but you are right the database connection took most of the time. Shopping cart is stored in session - not in database. I am half-way doing the eshop I bet it will took much more than 0.01 sec to generate the final version. I was going to make this file ca

[PHP] Re: PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Colin Guthrie
Martin Zvarík wrote: > I did a benchmark with and without caching to HTML file and it's like: > > 0.0031 sec (with) and 0.0160 sec (with database) > > I know these miliseconds don't matter, but it will have significant > contribution in high-traffic website, won't it? I would say yes. A good cac

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread lists
Quoting Martin Zvarík <[EMAIL PROTECTED]>: I did a benchmark with and without caching to HTML file and it's like: 0.0031 sec (with) and 0.0160 sec (with database) I know these miliseconds don't matter, but it will have significant contribution in high-traffic website, won't it? Martin -- PHP

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
I did a benchmark with and without caching to HTML file and it's like: 0.0031 sec (with) and 0.0160 sec (with database) I know these miliseconds don't matter, but it will have significant contribution in high-traffic website, won't it? Martin -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
I know it does, but I think it is still faster to include a generated HTML file than query a database. But is it worth the miliseconds? --- Peter Lauri napsal(a): MySQL has caching functions I believe. Read here: http://dev.mysql.com/doc/refman/5.0/en/query-cache.html Best regards, Peter Lauri

RE: [PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Peter Lauri
MySQL has caching functions I believe. Read here: http://dev.mysql.com/doc/refman/5.0/en/query-cache.html Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Martin Zvarík [mail

[PHP] PHP+MySQL website cache ? Yes/No

2007-02-25 Thread Martin Zvarík
Hi, I am making an eshop and I am thinking about caching system. You understand, that it cannot be entirely cached because visitor has it's own shopping cart etc. So, my thought is to cache only few blocks like "Categories", "Navigation menu" etc. by storing it to an HTML file. The advant