[PHP] help with GD

2005-04-03 Thread andreja
is there any way to edit and resize animated gifs in PHP?
with imagegif() i only get a static image 

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



Re: [PHP] link problem - Apache or PHP?

2005-04-03 Thread Burhan Khalid
germ germ wrote:
In my HTML file the HREF tag is: A
HREF=www.google.com TARGET=_blankgoogle.com/A
When clicked, the link in then directed to:
http://10.10.1.5/test-a/ref/www.google.com
Basically it seems like it appends the link to the URL
path.
This sounds like a base href problem; nothing related to php or apache.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Cannot connect to database when using Zend studio debugger

2005-04-03 Thread Burhan Khalid
Supersky wrote:
Dear Richard,
Thanks.
After I swaped to PHP4 option in the preference of Zend Studio, I can 
connect to the database. However, other problems arised. The problem might 
be that my PHP version installed is 5.0.3 indeed.
You should post this stuff at the My Zend center at zend.com -- they are 
really good with supporting such things.  I've had a few issues with 
Zend studio that they showed me how to fix.

Although I'm still a bit annoyed that they don't support subversion, 
studio is still a great product.

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


[PHP] Fwd: installing phpMyAdmin on Windows 2000 using IIS Server

2005-04-03 Thread wan nordiana Wan Abd Kadir
Note: forwarded message attached.
		Do you Yahoo!? 
Make Yahoo! your home page 
 
 
---BeginMessage---
hi..i wanna ask some question regarding the phpMyadmin installationon windows 2000. I am using IIS as the server. so far, when i searched in the internet on how to install phpMyadmin all i got was 'How to Install phpMyAdmin on Apache server'..is it differentbetween those two? i mean installing phpMyAdmin on Apache and IIS server.

Please reply me..__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---End Message---
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problems compiling PHP-5.0.4 with cPanel.

2005-04-03 Thread Jordi Canals
Hi,

I have an VPS server wich runs cPanel. My PHP version currently
installed is 5.0.3 and had no problems until now.

I've been trying to upgrade my PHP version from 5.0.3 to 5.0.4 with no
success. I've tried doing it with WHM and also tried to do it manually
with ./configure and make.

Always I've get an error when the system is going to build the library
libphp5.la and the building finishes there. The error I get is: make:
*** [libphp5.la] Error 1

I've been searching about this error, but found no significant
information about it. The two things I've found is:

1. The package could be corrupted (But packages are chacked with md5).

2. There is not memory on the server to compile PHP. Perhaps it could
be the problem, as I followed a compile and it looks like it crashes
when the memory gets low.

Also I've tried to recompile PHP 5.0.3 wich is now running on my
server and I get the same error. Perhaps this could be related with
the new builder realease that cPanel released, and wich includes some
more stuff (like the mysqli extension)?

I'm really stuck with this triying to recompile PHP on my box, but had
no success.

Any help about this issue will be really apreciated.

Regards,
Jordi.

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



[PHP] Re: How to insert and select images from postgres db

2005-04-03 Thread andreja
i have done this before, but with mysql
here is the way:

?
// you'l have to make file imageCreator.php
// with this content
// do not leave any content or blan spaces befor ?
// at he begining of the code!!!
// because of header information

 function createImageFromDatabase($someID){
 $host = host;
 $user = root;
 $pass = ;
 $dbName = imageDB;
 $conn = mysql_connect($host, $user, $pass) or die(mysql_error());
 mysql_select_db($dbName, $conn);
 $qry = select img.rowdata from rowdata where imgID = $someID;
 $result = mysql_query($qry, $conn) or die(mysql_error());
 $data = mysql_fetch_assoc($result);

 $imageContent = $data['rowdata'];
 $image = imagecreatefromstring($imageContent);

 header(Content-type: image/png);
 imagepng($image);
}
 createImageFromDatabase($_GET['imageID']);
?

now your link in other file , whitch will display a picture, would be
img src=imageCreator.php?imageID=76187/



J.F.Kishor [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,

 I am having a problem in storing and selecting images in and
 from postgres.

 My requirement is I have to select the image from the database
 and display it in User Interface.

 Can anyone help me through this problem, I'am in need of this
 solution by today.



 Regards,
 - JFK
 kishor
 Nilgiri Networks 

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



[PHP] Re: How to insert and select images from postgres db

2005-04-03 Thread andreja
same thing for inserting, or similar
but youl have to read file s
something like:
?
$file = path/file.jpg;
$handle = $fopen ($file, r);
$size = filesize($file, $handle);
$content = fread($handle, $size);
$content = mysql_escape_string($content);

// and now you can insert it into database
?


J.F.Kishor [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi,

 I am having a problem in storing and selecting images in and
 from postgres.

 My requirement is I have to select the image from the database
 and display it in User Interface.

 Can anyone help me through this problem, I'am in need of this
 solution by today.



 Regards,
 - JFK
 kishor
 Nilgiri Networks 

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



Re: [PHP] link problem - Apache or PHP?

2005-04-03 Thread BAO RuiXian

germ germ wrote:
In my HTML file the HREF tag is: A
HREF=www.google.com TARGET=_blankgoogle.com/A
When clicked, the link in then directed to:
http://10.10.1.5/test-a/ref/www.google.com
Basically it seems like it appends the link to the URL
path.

Yes, guess you have a base tag on the page, which reads 
http://10.10.1.5/test-a/ref. Please try use the absolute link, that is

   HREF=http://www.google.com; TARGET=_blankgoogle.com/A
Good luck
Bao
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: image_type

2005-04-03 Thread andreja
I realy dont understand what are you saying :)

William Stokes [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hello,

 I was under impression that php automatically gives values to image_type 
 and image_name if one tries to upload image from a web form if the name of 
 the uploaded image field is image.

 If I do this I can see that there is a path for the uploaded image in a 
 variable but the echo won't print anything. Where I am mistaken here?

 var_dump($_GET);
 echo $image_name;

 Thanks
 -Will 

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



[PHP] eregi problem

2005-04-03 Thread emre
I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
numeric chars only. here, how I check the variable:

if((eregi([^a-zA-Z0-9],$GP[sifre])
echo 'true';
else
echo 'false';

It works if variable starts with alphabetic chars only.
for example this returns 'ok'
$GP[sifre]='blabla234243';
but this does not work: (if variable starts with numeric chars)
$GP[sifre]='3243242blabla';

second one returns false, couldnt figure out the problem here. any help ?

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



[PHP] Re: eregi problem

2005-04-03 Thread andreja
i'm not familliar with regular expresions but i think that  ^a-z - means 
that variable must start witx a-z characters
you can chek it  here:

http://www.php.net/manual/en/reference.pcre.pattern.syntax.php


[EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
 numeric chars only. here, how I check the variable:

 if((eregi([^a-zA-Z0-9],$GP[sifre])
echo 'true';
 else
echo 'false';

 It works if variable starts with alphabetic chars only.
 for example this returns 'ok'
$GP[sifre]='blabla234243';
 but this does not work: (if variable starts with numeric chars)
$GP[sifre]='3243242blabla';

 second one returns false, couldnt figure out the problem here. any help ? 

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



Re: [PHP] PHP 5 Status

2005-04-03 Thread Jason Barnett
Colin Ross wrote:
 Now, as far as I know though, there are still issues with Apache 2 and
 PHP-libraries, correct?


Yes, there are potential threading problems unless you use the pre-fork
version of Apache2.

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


[PHP] Re: eregi problem

2005-04-03 Thread andreja
I really dont know :)



[EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
 numeric chars only. here, how I check the variable:

 if((eregi([^a-zA-Z0-9],$GP[sifre])
echo 'true';
 else
echo 'false';

 It works if variable starts with alphabetic chars only.
 for example this returns 'ok'
$GP[sifre]='blabla234243';
 but this does not work: (if variable starts with numeric chars)
$GP[sifre]='3243242blabla';

 second one returns false, couldnt figure out the problem here. any help ? 

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



[PHP] Re: Signal 11 - php-5.0.1-dev - cygwin

2005-04-03 Thread Jason Barnett
Jason Barnett wrote:
 OK, so I built php-5.1.0-dev from source using cygwin / gcc.

 - buildconf ran ok
 - configure ran ok
 - make ran ok
 - make install failed.  Output was:

 Installing PHP SAPI module:   cgi
 Installing PHP CGI into: /usr/local/bin/
 Installing PEAR environment:  /usr/local/lib/php/
 Signal 11
 make[1]: *** [install-pear-installer] Error 139
 make: *** [install-pear] Error 2

 Any tips on what's going on here?  I haven't built PHP from source
 before so I would appreciate any tips / links.


Anyone have any ideas on this problem?  I'm still searching for an answer.


signature.asc
Description: OpenPGP digital signature


[PHP] Re: eregi problem

2005-04-03 Thread M. Sokolewicz
you'd be better off with something like
if(preg_match('#^[a-z0-9]+$#i', $GP['sifre'])) {
echo 'contains only alphanumeric chars';
} else {
echo 'contains characters which are not alphanumeric';
}
- tul
[EMAIL PROTECTED] wrote:
I really dont know :)

[EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
numeric chars only. here, how I check the variable:
if((eregi([^a-zA-Z0-9],$GP[sifre])
  echo 'true';
else
  echo 'false';
It works if variable starts with alphabetic chars only.
for example this returns 'ok'
  $GP[sifre]='blabla234243';
but this does not work: (if variable starts with numeric chars)
  $GP[sifre]='3243242blabla';
second one returns false, couldnt figure out the problem here. any help ? 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Using header(0 to manage user inactivity

2005-04-03 Thread C Drozdowski
I'd like to be able to timeout a user if they are inactive for X 
minutes. Say, if they walk away from the browser leaving sensivive data 
in plain view.

Is there any reason that using the header() function as below wouldn't 
be a reliable way to do this (albeit user-unfriendly)? It works for 
me on my Mac with various browsers, but I wonder how universally it 
will work.

$timeout = 900;  // 15 minutes
header('Refresh: ' . $timeout . ';url=www.whatever.com/logout.php');
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Multiple Select Field

2005-04-03 Thread Robb Kerr
Please excuse the length and complexity of this post. I am facing a 
complicated problem and need to find a solution. Also, I have posted this 
on both PHP and MySQL boards so please overlook the possibly slightly 
off-topic subject.

I have got one table that contains personal information about users. 
Another table consists of a list of many interests. This table is composed 
of simply 2 fields  an ID and the interest. (see below)

I can build an HTML form which includes a multiple select list out of which 
the user can select their interests. I have the list configured so that it 
displays the interest while the value stored is the ID. PHP stores this 
entry as an Array which I can easily turn into a comma delimited list 
before storing in the database.

Heres my problem. If I store a comma-delimited list in a text field in the 
Users table, how do I query to determine anyone that has selected specific 
interests? If I use a full-text search and someone selects 1 for their 
search criteria, the query will return anyone who selects 1, 10, 11, 12, 
13, 14, etc. as their interest.

This problem has surely occurred for others. It would affect how you store 
newsletters for which one might subscribe, keywords in a clipart system, 
interests the user has, anything from which you want your users to select 
multiple entries from a long list of choices.

Table = Interests
Fields = ID, int, auto-increment
Interests, text

Table = Users
Fields = ID, int, auto-increment
Name, text
Address, text
Interests, text

Thanx in advance for any help you might provide. If anyone knows of 
anything written on configuring this type of system, please include a link.

Robb
Digital IGUANA

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



Re: [PHP] eregi problem

2005-04-03 Thread BAO RuiXian

[EMAIL PROTECTED] wrote:
I m trying to check $GP[sifre] variable, $GP[sifre] must consist of alpha
numeric chars only. here, how I check the variable:
 

Try this:
if(eregi(^[a-zA-Z0-9]+$,$GP[sifre]))
The above say that between the beginning of the string ^ and the end 
of the string $, there are only alpha-numeric characters but at least 
one. Note, your following code has syntax error.

Best
Bao
 

if((eregi([^a-zA-Z0-9],$GP[sifre])
   echo 'true';
else
   echo 'false';
It works if variable starts with alphabetic chars only.
for example this returns 'ok'
   $GP[sifre]='blabla234243';
but this does not work: (if variable starts with numeric chars)
   $GP[sifre]='3243242blabla';
second one returns false, couldnt figure out the problem here. any help ?
 

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


[PHP] users online

2005-04-03 Thread Ryan A
Hi,
I have been searching the archives with little luck so I need a reminder
here,
I remember a little while ago someone asked how  to implement the users
online functionality
that some sites have...now i have been asked to do exactly that but with a
small twist:
instead of displaying xx number of users online they want me to display
all the usernames who are online
with a link to their profile.

I have a few ideas on how this can be done, but I would like advise from
people who have already done this
or thought of doing it (i think there was also a class that does something
like this i'll check while waiting for a reply from you guys) so i can
compare it with my ideas (which are in the infancy stage ;-)  )

Thanks,
Ryan



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.1 - Release Date: 4/1/2005

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



Re: [PHP] users online

2005-04-03 Thread Ewout de Boer
Ryan A schreef:
 Hi,
 I have been searching the archives with little luck so I need a reminder
 here,
 I remember a little while ago someone asked how  to implement the users
 online functionality
 that some sites have...now i have been asked to do exactly that but with a
 small twist:
 instead of displaying xx number of users online they want me to display
 all the usernames who are online
 with a link to their profile.
 
 I have a few ideas on how this can be done, but I would like advise from
 people who have already done this
 or thought of doing it (i think there was also a class that does something
 like this i'll check while waiting for a reply from you guys) so i can
 compare it with my ideas (which are in the infancy stage ;-)  )

Easiest way of doing this is adding a 'last seen' field to your user
profiles and updating that record with the current timestamp every time
the user requests a page.

Al you need to do when displaying the 'users online' info is getting al
profiles with the 'last seen' record on a time between now and x minutes
ago (depending on what you consider to be an 'online' user).

If you're using a database like mysql or postgresql for profile storage,
use a field type that the database software can handle internaly, this
can speed up the query.


regards,
Ewout

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



[PHP] very good resource

2005-04-03 Thread andreja
http://www.downloadfreetrial.com/scripts/php/ 

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



[PHP] (noob) listing folder content

2005-04-03 Thread p80
I have a folder let's call it /rep and would like to list all files in it 
and for each file $f I would like to check if $f == $some_value and if it 
does echo $f any idea how to do that?

thanx in advance

Pat

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



Re: [PHP] (noob) listing folder content

2005-04-03 Thread Justin Gruenberg
On Apr 3, 2005 3:32 PM, p80 [EMAIL PROTECTED] wrote:
 I have a folder let's call it /rep and would like to list all files in it
 and for each file $f I would like to check if $f == $some_value and if it
 does echo $f any idea how to do that?
 
 thanx in advance
 
 Pat

See the directory functions:
http://us4.php.net/manual/en/ref.dir.php

See the examples for readdir, which is going to be very similar to
what you're trying to do.
http://us4.php.net/manual/en/function.readdir.php

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



[PHP] Re: (noob) listing folder content

2005-04-03 Thread Jason Barnett
Read: http://php.net/manual/en/function.readdir.php

?php

$some_value = 'some_value';
$dir = './rep';
$fh = opendir($dir);

while(false !== ($file = readdir($fh))) {
  if ($file == $some_value) {
echo $file;
  }
}

?

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


[PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread nime
Is there any way to do a human check without sending any url/session 
cookie/hidden input value
from server to browser?

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



Re: [PHP] Multiple Select Field

2005-04-03 Thread Marek Kilimajer
FIND_IN_SET(str,strlist)
Returns a value 1 to N if the string str is in the string list
strlist consisting of N substrings. A string list is a string composed
of substrings separated by `,' characters. If the first argument is a
constant string and the second is a column of type SET, the
FIND_IN_SET() function is optimized to use bit arithmetic. Returns 0 if
str is not in strlist or if strlist is the empty string. Returns NULL if
either argument is NULL. This function will not work properly if the
first argument contains a comma (`,') character.

mysql SELECT FIND_IN_SET('b','a,b,c,d');
- 2



Robb Kerr wrote:
 Please excuse the length and complexity of this post. I am facing a 
 complicated problem and need to find a solution. Also, I have posted this 
 on both PHP and MySQL boards so please overlook the possibly slightly 
 off-topic subject.
 
 I have got one table that contains personal information about users. 
 Another table consists of a list of many interests. This table is composed 
 of simply 2 fields  an ID and the interest. (see below)
 
 I can build an HTML form which includes a multiple select list out of which 
 the user can select their interests. I have the list configured so that it 
 displays the interest while the value stored is the ID. PHP stores 
 this 
 entry as an Array which I can easily turn into a comma delimited list 
 before storing in the database.
 
 Heres my problem. If I store a comma-delimited list in a text field in the 
 Users table, how do I query to determine anyone that has selected specific 
 interests? If I use a full-text search and someone selects 1 for their 
 search criteria, the query will return anyone who selects 1, 10, 11, 12, 
 13, 14, etc. as their interest.
 
 This problem has surely occurred for others. It would affect how you store 
 newsletters for which one might subscribe, keywords in a clipart system, 
 interests the user has, anything from which you want your users to select 
 multiple entries from a long list of choices.
 
 Table = Interests
 Fields = ID, int, auto-increment
   Interests, text
 
 Table = Users
 Fields = ID, int, auto-increment
   Name, text
   Address, text
   Interests, text
 
 Thanx in advance for any help you might provide. If anyone knows of 
 anything written on configuring this type of system, please include a link.
 
 Robb
 Digital IGUANA
 

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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread Marek Kilimajer
nime wrote:
Is there any way to do a human check without sending any url/session 
cookie/hidden input value
from server to browser?
Do you mean telepathy?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] eregi problem

2005-04-03 Thread Josip Dzolonga
[EMAIL PROTECTED] wrote:
if((eregi([^a-zA-Z0-9],$GP[sifre])
I think that the ^ anchor is your problem, it shall be out of the brackets :
if (eregi(^[a-zA-Z0-9]+$, $GP['sifre'])) echo 'true';
else echo 'false';
(the above is tested and works perfect)
P.S. Take a look here 
http://www.php.net/manual/en/language.types.array.php#language.types.array.donts

--
Josip Dzolonga
http://josip.dotgeek.org
jdzolonga[at]gmail.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] image_type

2005-04-03 Thread Josip Dzolonga
William Stokes wrote:
 I was under impression that php automatically gives values to 
image_type and
 image_name if one tries to upload image from a web form if the name 
of the
 uploaded image field is image.

You mean it automatically gives values to variables $image_type and 
$image_name ? No, it doesn't. You can get the type (MIME) and the name 
of the file with $_FILES['filename']['type'] for the MIME-type and 
$_FILES['filename']['name'] for the filename. I encourage you to take a 
better look here : http://www.php.net/features.file-upload and you can 
also print_r/var_dump($_FILES);

Hope that helps,
--
Josip Dzolonga
http://josip.dotgeek.org
jdzolonga[at]gmail.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread nime
A kind of  :-)

https://nokiags.wdsglobal.com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=details.vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLanguageId=118

I mean what sort of data remembers the pass code here?
I see no hidden input value/url value/session cookie/nothing.
It means telepathy!


Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 nime wrote:
 Is there any way to do a human check without sending any url/session 
 cookie/hidden input value
 from server to browser?


 Do you mean telepathy? 

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



Re: [PHP] How to insert and select images from postgres db

2005-04-03 Thread Josip Dzolonga
Well take a look here http://www.php.net/base64_encode and here 
http://www.php.net/base64_decode , so before you put the image in 
database encode it first to get a string (with base64_encode), and when 
you pull the image from the MySQL database, after you get the string 
value decode it with base64_decode .

--
Josip Dzolonga
http://josip.dotgeek.org
jdzolonga[at]gmail.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Recommendation for a MySql wrapper class

2005-04-03 Thread Kevin Coyner


On Sat, Apr 02, 2005 at 01:08:30PM +0200, Marek Kilimajer wrote..

 If anybody (with more experience) than I thinks I am wrong...please
 tell me so and most prolly go with PEARs solution, another one high
 on my list is the ADODB as I remember someone else talking about it
 on the list some time back.
 
 You can pack PEAR classes with your project and set up include_path
 accordingly.

Like Ryan (original post), I too am about to embark on a new website
project and have the opportunity to do it differently.  In the past I
did the basic php/mysql connects, etc.  But since reading this post,
have looked into adodb and pear.

Pear looks very interesting and I've given it a go.  I like the looks of
DB_Table, and how it integrates with HTML_QuickForm.  I also like how
pear has the commandline interface to search, install and update.  But
this makes me wonder ... are newer releases of classes always compatible
with pages/scripts that I might have written earlier?  If I update a
class package, might it break my existing pages?  And finally, does the
pear project have enough momentum, and contributors, such that I can
feel comfortable that it will be around for a while?

I guess I'm asking these questions because the whole pear package
repository seems very dynamic (in a good way).  I'm just wondering if it
does make sense to 'pack' up the pear classes, with versions related to
my webpages, rather than assume the classes that get updated will always
work with my stuff.

Kind of a long winded question.  Apologies.

Kevin


-- 

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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread Ryan A
check up on CAPTCHA on google or your favourite search engine

-Ryan


On 4/3/2005 11:35:03 PM, nime ([EMAIL PROTECTED]) wrote:
 A kind of  :-)



 https://nokiags.wdsglobal.

com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=detai
ls.

vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLang
uageId=118



 I mean what sort of data remembers the pass code here?

 I see no hidden input value/url value/session cookie/nothing.

 It means telepathy!





 Marek Kilimajer [EMAIL PROTECTED] wrote in message news:42505D1E.
 [EMAIL PROTECTED]

  nime wrote:

  Is there any way to do a human check without sending any url/session
 cookie/hidden input value

  from server to browser?

 

 

  Do you mean telepathy?



 --

 PHP General Mailing List (http://www.php.net/)

 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.1 - Release Date: 4/1/2005


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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread Josip Dzolonga
nime wrote:
A kind of  :-)
https://nokiags.wdsglobal.com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=details.vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLanguageId=118
I mean what sort of data remembers the pass code here?
I see no hidden input value/url value/session cookie/nothing.
It means telepathy!
 

Well take a look at www.php.net/gd for generating images also here 
http://pear.php.net/package/Numbers_Words . See this random number 
generating function http://www.php.net/mt_rand too :-) Too many links, 
nah ? :) Store the number in a session variable and check if both match 
or not (you can store the md5 value too in a Cookie).

Hope that helps,
--
Josip Dzolonga
http://josip.dotgeek.org
jdzolonga[at]gmail.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread nime
I've already checked CAPTCHA thing. I have no clue how server remembers
the image. Imagine that you open two browser pages then go to captcha page.
You see two diffrerent numbers at both browsers. How does server decide which
connection established with two or more different browser pages (in this 
sample)?

Is there any hidden browser ID behind the HTTP protocol?

I repeat url is:
https://nokiags.wdsglobal.com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=details.vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLanguageId=118

Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 check up on CAPTCHA on google or your favourite search engine

 -Ryan

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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread nime
I know the mechanism. Did you examine the url? In this situation I wonder how 
they did coz
there is no cookie/no session cookie/no hidden input field.

https://nokiags.wdsglobal.com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=details.vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLanguageId=118


Josip Dzolonga [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 nime wrote:

A kind of  :-)

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



Re: [PHP] Multiple Select Field

2005-04-03 Thread Tom Rogers
Hi,

Monday, April 4, 2005, 2:58:36 AM, you wrote:
RK Please excuse the length and complexity of this post. I am facing a
RK complicated problem and need to find a solution. Also, I have posted this
RK on both PHP and MySQL boards so please overlook the possibly slightly
RK off-topic subject.

RK I have got one table that contains personal information about users.
RK Another table consists of a list of many interests. This table is composed
RK of simply 2 fields  an ID and the interest. (see below)

RK I can build an HTML form which includes a multiple select list out of which
RK the user can select their interests. I have the list configured so that it
RK displays the interest while the value stored is the ID. PHP stores 
this
RK entry as an Array which I can easily turn into a comma delimited list
RK before storing in the database.

RK Heres my problem. If I store a comma-delimited list in a text field in the
RK Users table, how do I query to determine anyone that has selected specific
RK interests? If I use a full-text search and someone selects 1 for their
RK search criteria, the query will return anyone who selects 1, 10, 11, 12,
RK 13, 14, etc. as their interest.

RK This problem has surely occurred for others. It would affect how you store
RK newsletters for which one might subscribe, keywords in a clipart system,
RK interests the user has, anything from which you want your users to select
RK multiple entries from a long list of choices.

RK Table = Interests
RK Fields = ID, int, auto-increment
RK Interests, text

RK Table = Users
RK Fields = ID, int, auto-increment
RK Name, text
RK Address, text
RK Interests, text

RK Thanx in advance for any help you might provide. If anyone knows of
RK anything written on configuring this type of system, please include a link.

RK Robb
RK Digital IGUANA


Create a third table which links the other two, it will make life
easier for searches and stats and be a lot quicker.

table = user_interests
fields userid int, interestsid int

primary index would be on both fields

-- 
regards,
Tom

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



[PHP] What's the going rate for making websites ?

2005-04-03 Thread -{ Rene Brehmer }-
Hi gang
Sorry for asking this question here, but I don't know where else to ask. 
And Goole'ing didn't help me much.

My father-in-law has a friend in Alaska (and I'm in Canada) that needs a 
website done. Not sure what kinda site he wants done yet, or how much he 
needs me to do for him (like webspace, domain hosting, domain registration, 
and such) but for now I've been asked what it'd cost to get it done.

I'm assuming it's something pretty simple, since it's just for a motorcycle 
club, but he wants a price first ...

What do y'all charge when you do sites for people ??? ... In the past I've 
only done pro-bono work (because they usually don't require much work, so 
it's not a problem getting it done while working on other projects), but 
I've never actually done paid work before... It's more that I just recently 
moved to Canada (from Denmark) so I have no feeling with what the prices 
and rates are overhere ...

TIA
Rene 

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


Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread Marek Kilimajer
nime wrote:
A kind of  :-)
https://nokiags.wdsglobal.com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=details.vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLanguageId=118
I mean what sort of data remembers the pass code here?
I see no hidden input value/url value/session cookie/nothing.
It means telepathy!
Maybe the captcha string is stored based on ip address

Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
nime wrote:
Is there any way to do a human check without sending any url/session 
cookie/hidden input value
from server to browser?
Do you mean telepathy? 

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


Re: [PHP] What's the going rate for making websites ?

2005-04-03 Thread Robby Russell
On Sun, 2005-04-03 at 16:51 -0600, -{ Rene Brehmer }- wrote:
 Hi gang
 
 Sorry for asking this question here, but I don't know where else to ask. 
 And Goole'ing didn't help me much.
 
 My father-in-law has a friend in Alaska (and I'm in Canada) that needs a 
 website done. Not sure what kinda site he wants done yet, or how much he 
 needs me to do for him (like webspace, domain hosting, domain registration, 
 and such) but for now I've been asked what it'd cost to get it done.
 
 I'm assuming it's something pretty simple, since it's just for a motorcycle 
 club, but he wants a price first ...
 
 What do y'all charge when you do sites for people ??? ... In the past I've 
 only done pro-bono work (because they usually don't require much work, so 
 it's not a problem getting it done while working on other projects), but 
 I've never actually done paid work before... It's more that I just recently 
 moved to Canada (from Denmark) so I have no feeling with what the prices 
 and rates are overhere ...
 

$x = What is your time worth?

$y = How long will it take you?

$cost = $x * $z


-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP, Ruby, and PostgreSQL Development
* http://www.robbyonrails.com/
/

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



[PHP] A strange problem..

2005-04-03 Thread JoShQuNe \(TR\)
Hi, i have a strange problem. In my site i have to counters for file
downloads. One is general, other is weekly. On the main page i
display a list sorted according to weekly hits. The problem is there:
i give this prompt mysql_query(SELECT * FROM table ORDER BY
weekly_hits DESC LIMIT 15) to display top 15 but if the hit is
greater than 9 itz not displayed. What maybe the reason? Is it
possible to be because of the place of the weekly_hits column in the
table? When i try to sort by general hit, it does, but general hits
are started with 600s so i couldn't get what happens.. Thanx for
help.. 



__ 
Do you Yahoo!? 
Yahoo! Personals - Better first dates. More second dates. 
http://personals.yahoo.com

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



Re: [PHP] What's the going rate for making websites ?

2005-04-03 Thread Leif Gregory
Hello -{,

Sunday, April 3, 2005, 4:51:29 PM, you wrote:
RB What do y'all charge when you do sites for people ??? ... In the
RB past I've only done pro-bono work (because they usually don't
RB require much work, so it's not a problem getting it done while
RB working on other projects), but I've never actually done paid work
RB before... It's more that I just recently moved to Canada (from
RB Denmark) so I have no feeling with what the prices and rates are
RB overhere ...

You really need to have him lay out a scope of work for you. If you
don't know what he want, there's no way you can give him an estimate.
If he wants ten static pages, then quote him that. If he wants a
dynamic site with a forum and shopping cart, then that's a huge
difference in what I would charge.

I don't know what they normally charge there, but here's what I've
seen here in the US for the following under contract for State gov't.

- Roughly 20 pages (customer provides content)
- Dynamic pulling from a MySQL backend (news, current items etc).
- Admin / Editor pages to add / edit / delete the dynamic content
- Supporting Section 508 and WCAG 1.0
- Considered work for hire (customer owns source afterwards)

Cost: $18,000 (Actual figure I saw on a quote).

They weren't even going to provide the hosting space for the site nor
the MySQL backend. They were going to develop basically the framework
for the group to add their own content and the DB tables.

I was pretty stunned when I saw that. According to the people who
showed me the quote that wasn't even the highest one.

I do a lot of work as a project manager for various application / web
development. One thing I will tell you that you need to really drive
home to your customer is sticking to the scope of work. When you both
sign the dotted line as to what is expected from the project make sure
they fully understand that deviations from that will cost more. It
took me about three or four projects where scope creep *positively*
killed me before I learned my lesson. It always starts small, a change
to a color here, moving an image just a bit this way or that, then
they throw a real wrench in the works by deciding they want to do
something like add a whole new layer of people with certain rights in
the application which blows away your existing authentication /
security model.

This person might be a friend (or father-in-laws friend), but I can't
stress the importance of having a contract in place for both of your
protection.

Also make sure both parties understand what's to be paid for and what
isn't. A deliverables model will help with that. i.e. I get this much
money for adding this functionality to the site. This way if something
goes sour you can be paid for the work already completed.

Also, make sure you keep the customer in the loop. After certain
milestones, show them where you're at to make sure you're still on the
same page. This opens you up a bit more to scope creep, but making a
relatively small change in the beginning is a whole lot better than
nearly starting over at the end.


Cheers,
Leif Gregory 

-- 
TB Lists Moderator (and fellow registered end-user)
PCWize Editor  /  ICQ 216395  /  PGP Key ID 0x7CD4926F
Web Site http://www.PCWize.com

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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread andreja
did anyone tryed to paste this in address
https://nokiags.wdsglobal.com/imageservlet



Ryan A [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 check up on CAPTCHA on google or your favourite search engine

 -Ryan


 On 4/3/2005 11:35:03 PM, nime ([EMAIL PROTECTED]) wrote:
 A kind of  :-)



 https://nokiags.wdsglobal.

 com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=detai
 ls.

 vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLang
 uageId=118



 I mean what sort of data remembers the pass code here?

 I see no hidden input value/url value/session cookie/nothing.

 It means telepathy!





 Marek Kilimajer [EMAIL PROTECTED] wrote in message news:42505D1E.
 [EMAIL PROTECTED]

  nime wrote:

  Is there any way to do a human check without sending any url/session
 cookie/hidden input value

  from server to browser?

 

 

  Do you mean telepathy?



 --

 PHP General Mailing List (http://www.php.net/)

 To unsubscribe, visit: http://www.php.net/unsub.php



 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.308 / Virus Database: 266.9.1 - Release Date: 4/1/2005
 

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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread andreja
i am pretty new in all of this, but i added this sites to restricted web 
sites in IE settings, so now it doesnt work at all


Ryan A [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 check up on CAPTCHA on google or your favourite search engine

 -Ryan


 On 4/3/2005 11:35:03 PM, nime ([EMAIL PROTECTED]) wrote:
 A kind of  :-)



 https://nokiags.wdsglobal.

 com/bookmarkmanual?contractId=191phoneId=408captchaEnabled=truestep=detai
 ls.

 vmbookmarkManualName=bookmarkManualURL=captchaKey=mobileNumber=siteLang
 uageId=118



 I mean what sort of data remembers the pass code here?

 I see no hidden input value/url value/session cookie/nothing.

 It means telepathy!





 Marek Kilimajer [EMAIL PROTECTED] wrote in message news:42505D1E.
 [EMAIL PROTECTED]

  nime wrote:

  Is there any way to do a human check without sending any url/session
 cookie/hidden input value

  from server to browser?

 

 

  Do you mean telepathy?



 --

 PHP General Mailing List (http://www.php.net/)

 To unsubscribe, visit: http://www.php.net/unsub.php



 -- 
 No virus found in this outgoing message.
 Checked by AVG Anti-Virus.
 Version: 7.0.308 / Virus Database: 266.9.1 - Release Date: 4/1/2005
 

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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread nime
This url is the key. You may insert this img into your page at your own server
(event at your local machine) then send related form fields to remote site and 
viola!
It accepts the code!

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



Re: [PHP] HUMAN CHECK without url/session cookie/hidden input, etc.

2005-04-03 Thread nime
I've checked it. While IE open, I've turned off my modem then on.
With a new IP, I've passed.

Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 Maybe the captcha string is stored based on ip address

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



Re: [PHP] What's the going rate for making websites ?

2005-04-03 Thread Miles Thompson
Leif,
Amen, amen and amen.
Miles
At 08:52 PM 4/3/2005, Leif Gregory wrote:
Hello -{,
Sunday, April 3, 2005, 4:51:29 PM, you wrote:
RB What do y'all charge when you do sites for people ??? ... In the
RB past I've only done pro-bono work (because they usually don't
RB require much work, so it's not a problem getting it done while
RB working on other projects), but I've never actually done paid work
RB before... It's more that I just recently moved to Canada (from
RB Denmark) so I have no feeling with what the prices and rates are
RB overhere ...
You really need to have him lay out a scope of work for you. If you
don't know what he want, there's no way you can give him an estimate.
If he wants ten static pages, then quote him that. If he wants a
dynamic site with a forum and shopping cart, then that's a huge
difference in what I would charge.
I don't know what they normally charge there, but here's what I've
seen here in the US for the following under contract for State gov't.
- Roughly 20 pages (customer provides content)
- Dynamic pulling from a MySQL backend (news, current items etc).
- Admin / Editor pages to add / edit / delete the dynamic content
- Supporting Section 508 and WCAG 1.0
- Considered work for hire (customer owns source afterwards)
Cost: $18,000 (Actual figure I saw on a quote).
They weren't even going to provide the hosting space for the site nor
the MySQL backend. They were going to develop basically the framework
for the group to add their own content and the DB tables.
I was pretty stunned when I saw that. According to the people who
showed me the quote that wasn't even the highest one.
I do a lot of work as a project manager for various application / web
development. One thing I will tell you that you need to really drive
home to your customer is sticking to the scope of work. When you both
sign the dotted line as to what is expected from the project make sure
they fully understand that deviations from that will cost more. It
took me about three or four projects where scope creep *positively*
killed me before I learned my lesson. It always starts small, a change
to a color here, moving an image just a bit this way or that, then
they throw a real wrench in the works by deciding they want to do
something like add a whole new layer of people with certain rights in
the application which blows away your existing authentication /
security model.
This person might be a friend (or father-in-laws friend), but I can't
stress the importance of having a contract in place for both of your
protection.
Also make sure both parties understand what's to be paid for and what
isn't. A deliverables model will help with that. i.e. I get this much
money for adding this functionality to the site. This way if something
goes sour you can be paid for the work already completed.
Also, make sure you keep the customer in the loop. After certain
milestones, show them where you're at to make sure you're still on the
same page. This opens you up a bit more to scope creep, but making a
relatively small change in the beginning is a whole lot better than
nearly starting over at the end.
Cheers,
Leif Gregory
--
TB Lists Moderator (and fellow registered end-user)
PCWize Editor  /  ICQ 216395  /  PGP Key ID 0x7CD4926F
Web Site http://www.PCWize.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] php - set interval

2005-04-03 Thread Andrew
hello,
i've been searching for a 'setInterval' function in php and haven't had 
much luck.

in actionscript (which is similar to php) you can make a function which 
calls another function at a set interval, and i was keen to do this with 
php for a mail script so that rather than sending 500 emails at once, i 
can send 10 emails every 10 seconds etc.

i'm currently thinking i'll have to use flash to make the interval, but 
would rather keep it all in php.

basically what i want to do is this.
function SendMail($howManyToSend, $fromWhatIndex){
// gets the number of email addresses ($howManyToSend)
// from the database, starting at index $fromWhatIndex
// then sends them

if(all emails sent, no more emails in DB){
return 'finished';
}else{
return 'keep them coming';  
}
}
function IntervalCalled (){

// increment currentIndex
$currentIndex = $currentIndex + 10;
$howDidWeGo = SendMail(10, $currentIndex);
if($howDidWeGo == finished){
// FLASH CLEARINTERVAL COMMAND
clearInterval($makeEmailsInterval);
}
}
// THIS IS HOW I WOULD CALL THE INTERVAL IN FLASH
// (for every 10 seconds)
$makeEmailsInterval = setInterval(IntervalCalled, 1);

so is this possible with PHP by using functions? anything involving 
complicated server stuff means i may as well setup flash to call the 
interval instead of PHP

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


Re: [PHP] php - set interval

2005-04-03 Thread Rasmus Lerdorf
None of this makes any sense.  PHP is a server-side request-based 
language.  If you want to put a delay in between things on a request, 
call sleep(), but it is still just a single request which is going to 
take a finite amount of time to run.

The correct way to send a bunch of emails is to queue them in your MTA 
and have your MTA do efficient grouping and delivery of the messages. 
Use the right tool for the job.

-Rasmus
Andrew wrote:
hello,
i've been searching for a 'setInterval' function in php and haven't had 
much luck.

in actionscript (which is similar to php) you can make a function which 
calls another function at a set interval, and i was keen to do this with 
php for a mail script so that rather than sending 500 emails at once, i 
can send 10 emails every 10 seconds etc.

i'm currently thinking i'll have to use flash to make the interval, but 
would rather keep it all in php.

basically what i want to do is this.
function SendMail($howManyToSend, $fromWhatIndex){
// gets the number of email addresses ($howManyToSend)
// from the database, starting at index $fromWhatIndex
// then sends them

if(all emails sent, no more emails in DB){
return 'finished';
}else{
return 'keep them coming';   
}
}

function IntervalCalled (){

// increment currentIndex
$currentIndex = $currentIndex + 10;

$howDidWeGo = SendMail(10, $currentIndex);
if($howDidWeGo == finished){
// FLASH CLEARINTERVAL COMMAND
clearInterval($makeEmailsInterval);
}
}
// THIS IS HOW I WOULD CALL THE INTERVAL IN FLASH
// (for every 10 seconds)
$makeEmailsInterval = setInterval(IntervalCalled, 1);

so is this possible with PHP by using functions? anything involving 
complicated server stuff means i may as well setup flash to call the 
interval instead of PHP

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


[PHP] functions vs classes

2005-04-03 Thread DuSTiN KRySaK
Novice PHPer, and i am wondering why one would use a function instead 
of a class (or object)? They seem to server very similar in use.

The way I see it, is a function if for repeated use in a project 
specific manner, where as a class could be used for many projects.

is this correct?
Although one could just include the function library in multiple 
projects.

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


[PHP] How to call a static class and method dynamically

2005-04-03 Thread Dan Rossi
I was wonderiing how I would go about something like this
$class = 'classname';
return $class::staticMethod(); , not happy isnt working. Any ideas 
lemme know.

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


Re: [PHP] functions vs classes

2005-04-03 Thread Lars B. Jensen
Novice PHPer, and i am wondering why one would use a function instead of a 
class (or object)? They seem to server very similar in use.
All depends on the specific use and situation - pros and cons by both 
models, for speed and performance, I mostly use optimized functions sorted 
out in structured files for easy reuse, rather than objects. PHP5 seem to 
embrase object orientation more, so lets see if a war starts again - it's 
religion. Think before you program.

The way I see it, is a function if for repeated use in a project specific 
manner, where as a class could be used for many projects.
It's precisely the same, if you include a file with your class or include a 
file with your functions, whats the difference ? none.

--
Lars B. Jensen, Internet Architect
CareerCross Japan
Japan's premier online career resource for english speaking professionals
http://www.careercross.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] functions vs classes

2005-04-03 Thread Domas Juknevicius / DEFORM GROUP
Hello,

Quite good and short answer to your question:
http://answers.google.com/answers/threadview?id=207071

--
Domas Juknevicius

DuSTiN KRySaK wrote:
 Novice PHPer, and i am wondering why one would use a function instead of
 a class (or object)? They seem to server very similar in use.
 
 The way I see it, is a function if for repeated use in a project
 specific manner, where as a class could be used for many projects.
 
 is this correct?
 
 Although one could just include the function library in multiple projects.
 
 Thanks!
 
 Dustin
 

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