|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Mon Aug 06 2001 - 03:05:23 CDT
php-general Digest 6 Aug 2001 08:05:23 -0000 Issue 799
Topics (messages 61342 through 61381):
Re: SetLocal() problem
61342 by: Tom Carter
Re: 404's and requesting page
61343 by: Tim
61351 by: Tom Carter
61353 by: Tim
magazine-subscription
61344 by: Chetan Ganpati
61345 by: Corey Chapman
61346 by: rm
61370 by: Maxim Maletsky
xml_set_object() ?!?
61347 by: Regenfeld
age
61348 by: Jon Yaggie
61352 by: Corey Chapman
61355 by: Tim
61377 by: Jan Wilson
Re: How To?
61349 by: Michael Quinn
61350 by: Michael Quinn
Re: syntax help~~~
61354 by: Coconut Ming
61362 by: Arcadius A.
Re: Minutes between tow dates
61356 by: Christian Reiniger
Re: project management scripts?
61357 by: Meir Kriheli
61368 by: Andreas D. Landmark
Re: Spot the difference?
61358 by: Kyle Smith
field sizes
61359 by: Matthew Delmarter
is there a performance hit using flush() ?
61360 by: Matthew Delmarter
using placeholders and db results
61361 by: Matthew Delmarter
61367 by: Gyozo Papp
Limit records/ prev/next links
61363 by: Steph
61364 by: Richard Kurth
61366 by: pierre-yves
pursing a text file
61365 by: Richard Kurth
Problems...
61369 by: Marius Pertravèius
spell checker
61371 by: Justin French
61375 by: Rasmus Lerdorf
61376 by: David Robley
61379 by: Michael Hall
Premature end of script headers:
61372 by: Gary
61373 by: Jason Murray
Re: fopen a URL with = in it
61374 by: Corey Chapman
Form call a function on submit
61378 by: Richard Kurth
61380 by: Michael Hall
phpAdsNew from newbie
61381 by: Jack
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
iso.ch has all ISO standards
----- Original Message -----
From: "Gyozo Papp" <pgerzson
freestart.hu>
To: "Frédéric Mériot" <frederic
argyro.net>; "Don Read" <dread
texas.net>
Cc: <php-general
lists.php.net>
Sent: Sunday, August 05, 2001 7:04 PM
Subject: Re: [PHP] SetLocal() problem
> Hi,
>
> well I don't read thoroughly this site, but really hope this helps:
>
> http://lcweb.loc.gov/standards/
>
>
> ----- Original Message -----
> From: "Frédéric Mériot" <frederic
argyro.net>
> To: "Don Read" <dread
texas.net>
> Cc: <php-general
lists.php.net>
> Sent: 2001. augusztus 2. 09:17
> Subject: Re: [PHP] SetLocal() problem
>
>
> > Thanks a lot, but I must precise that I'm running PHP (4.0.6) under
NT2000
> > (client not server) platform.
> > 'fr_FR.ISO_8859-1' does not work too.
> >
> > So, it's not very important, but where can I find the entire list of
> > countries with their ISO code?
> >
> > Thanks.
> >
> >
> > ----- Original Message -----
> > From: "Don Read" <dread
texas.net>
> > To: "Frédéric Mériot" <frederic
argyro.net>
> > Cc: <php-general
lists.php.net>
> > Sent: Thursday, August 02, 2001 4:10 AM
> > Subject: RE: [PHP] SetLocal() problem
> >
> >
> > >
> > > On 01-Aug-2001 Frédéric Mériot wrote:
> > > > Hello, I've got a little problem with the setLocal function. In many
> > > > tutorials they give this syntax:
> > > > setlocale('LC_TIME','fr_FR'); // for france
> > > >
> > > > I tried this but the "fr_FR" keyword does not seem to work. If I try
> > > > "french" instead it works.
> > > > I've got the same problem with all other countries keywords (C for
> > finland,
> > > > pt_BR for portugal ...etc).
> > > > If i do not put the name of a country, it does not work.
> > > >
> > > > Please help!
> > >
> > > Use the full ISO lang.charset definition : 'fr_FR.ISO_8859-1'.
> > > (Linux allows aliases as defined in locale.alias, that's why
"french"
> > works).
> > >
> > > Regards,
> > > --
> > > Don Read dread
texas.net
> > > -- It's always darkest before the dawn. So if you are going to
> > > steal the neighbor's newspaper, that's the time to do it.
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
$HTTP_SERVER_VARS["REDIRECT_STATUS"] will be "404" (or "403" if you trap
those too).
$HTTP_SERVER_VARS["REDIRECT_URL"] will be the requested URL that caused
the error.
- Tim
http://www.phptemplates.org
On 05 Aug 2001 18:46:04 +0100, Tom Carter wrote:
> I'm using an apache directive to redirect 404's to one of my own pages, and
> i was wondering it is possible find out what the request was that caused
> 404.
attached mail follows:
Thanks for the advice Tim, however it didn't work. Neither of the statements
in your mail were set ... I trued $REDIRECT_STATUS and that was set to 401
(even tho that doc wasn't capturing that error) and $REDIRECT_URL was set to
the path of the file handling the errors.
Is there some other apache config I need to make?
The .htaccess line I have doing the redirect is
ErrorDocument 404 path/to/file
Thanks a million for any help, Tom
> $HTTP_SERVER_VARS["REDIRECT_STATUS"] will be "404" (or "403" if you trap
> those too).
>
> $HTTP_SERVER_VARS["REDIRECT_URL"] will be the requested URL that caused
> the error.
>
> - Tim
> http://www.phptemplates.org
>
> On 05 Aug 2001 18:46:04 +0100, Tom Carter wrote:
> > I'm using an apache directive to redirect 404's to one of my own pages,
and
> > i was wondering it is possible find out what the request was that caused
> > 404.
>
>
attached mail follows:
Ah, yes. You are correct about the $REDIRECT_URL thing. I was looking
at some old code I had to deal with this and mis-read it. :)
I use ErrorDoument just as you describe.
I just tried this, and on my system $HTTP_SERVER_VARS["REQUEST_URI"]
contains the URI that generated the error.
If your 404 page just dumps phpinfo() you can see the list of variables
available to your script.
- Tim
On 05 Aug 2001 21:16:29 +0100, Tom Carter wrote:
> Thanks for the advice Tim, however it didn't work. Neither of the statements
> in your mail were set ... I trued $REDIRECT_STATUS and that was set to 401
> (even tho that doc wasn't capturing that error) and $REDIRECT_URL was set to
> the path of the file handling the errors.
>
> Is there some other apache config I need to make?
> The .htaccess line I have doing the redirect is
> ErrorDocument 404 path/to/file
attached mail follows:
Hi,
Does anyone know of a tool to handle an online
magazine and the magazine-subscriptions?
Thanks,
Chetan.
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
attached mail follows:
Nope.. we are writing our own to handle our Ezine. Best bet is to work
on a mysql/php system, unless you can find one.
> Hi,
>
> Does anyone know of a tool to handle an online
> magazine and the magazine-subscriptions?
>
> Thanks,
> Chetan.
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo!
Messenger
> http://phonecard.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-
admin
lists.php.net
>
>
>
Corey Chapman
Xnull CEO
(Chat with us: http://forum.xnull.com)
attached mail follows:
This might give you a start
http://sourceforge.net/projects/props/
--- Chetan Ganpati <chetan_off
yahoo.com> wrote:
> Hi,
>
> Does anyone know of a tool to handle an online
> magazine and the magazine-subscriptions?
>
> Thanks,
> Chetan.
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute
> with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
attached mail follows:
Neither we know,
we wrote Jinnie, an Open Source version of it will be out on jinnie.org in
couple of month or so.
Sorry, I know it wasn't any helpful.
The reason there are not much of this software is because there's no
standard for Magazines. Very hard to write something that would satisfy
every request.
Maxim Maletsky
-----Original Message-----
From: Corey Chapman [mailto:ze0
xnull.com]
Sent: Monday, August 06, 2001 4:13 AM
To: Chetan Ganpati; php-general
lists.php.net
Subject: Re: [PHP] magazine-subscription
Nope.. we are writing our own to handle our Ezine. Best bet is to work
on a mysql/php system, unless you can find one.
> Hi,
>
> Does anyone know of a tool to handle an online
> magazine and the magazine-subscriptions?
>
> Thanks,
> Chetan.
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo!
Messenger
> http://phonecard.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-
admin
lists.php.net
>
>
>
Corey Chapman
Xnull CEO
(Chat with us: http://forum.xnull.com)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Why is that not working:
class XML {
var $parser; var $Dummy;
function XML() { $this->parser = xml_parser_create(); xml_set_object($this->parser,&$this); xml_set_element_handler($this->parser,"tag_open","tag_close"); }
function getDummy() { echo $this->Dummy; }
function parseFile($uri) { $fp = fopen($uri, "r"); $string = fread($fp, 4096); fclose($fp); xml_parse($this->parser,$string) }
function tag_open($parser,$name,$attrs) { if ($name == "DummyElement") { $this->Dummy = $attrs['DummyAttribute']; } }
function tag_close($parser,$name) {} }
$main = new XML(); $main->parseFile(dummy.xml); $main->getDummy();
$Dummy is correctly set, but cannot be accessed via the method 'getDummy()' :-(
attached mail follows:
does any one know where i can get a script that will convert a birthdate in to an age. i have one half written however i have incounter difficulties with dealing with leap years. perhaps soem one would know the solution . .. or just a premade script is fine
$test = strtotime ("January 12, 1944"); $test2 = strtotime ("January 9, 1954");
$oneyear = 3600 * 24 * 365;
$diff = $test2 - $test; $ans = $diff/$oneyear;
echo $ans;
Thank You, Jon Yaggie www.design-monster.com And they were singing . . . '100 little bugs in the code 100 bugs in the code fix one bug, compile it again 101 little bugs in the code 101 little bugs in the code . . .' And it continued until they reached 0
attached mail follows:
Here's something I use for a date string that looks like mm/dd/yyyy to turn the date into an age from the current date.
$age = explode("/", $bdate); $userage = date("Y") - $age[2]; if($age[0] > date("m") || ( $age[0] = date("m") && $age[1] > date ("d"))) { --$userage; } if($userage > 50) { $userage = ""; }
I did not compensate for leap years, however. You could use my code, and it should work fine, but the first line where I do an explode, you'd have to change that to turn your date string into #'s like I use..
> > does any one know where i can get a script that will convert a birthdate in to an age. i have one half written however i have incounter difficulties with dealing with leap years. perhaps soem one would know the solution . .. or just a premade script is fine > > > $test = strtotime ("January 12, 1944"); > $test2 = strtotime ("January 9, 1954"); > > $oneyear = 3600 * 24 * 365; > > $diff = $test2 - $test; > $ans = $diff/$oneyear; > > echo $ans; > > > > > > Thank You, > > Jon Yaggie > www.design-monster.com > > And they were singing . . . > > '100 little bugs in the code > 100 bugs in the code > fix one bug, compile it again > 101 little bugs in the code > > 101 little bugs in the code . . .' > > And it continued until they reached 0 > > > >
Corey Chapman Xnull CEO (Chat with us: http://forum.xnull.com)
attached mail follows:
I've been using this one, which is probably close enough for government work ;) It calculates to a one-month resolution.
// Calculates elapsed years between fdate and tdate. // The default for "to date" is today. function elapsed_years($fdate, $tdate=0) { if ($tdate == 0) { $tdate = time(); }
$fa = getdate($fdate); $ta = getdate($tdate);
// convert dates to number of months since 1900: $fm = $fa["mon"] + (($fa["year"] - 1900) * 12); $tm = $ta["mon"] + (($ta["year"] - 1900) * 12);
$em = $tm - $fm;
return intval($em/12); }
- Tim http://www.phptemplates.org
On 06 Aug 2001 03:00:13 +0700, Jon Yaggie wrote: > does any one know where i can get a script that will convert a birthdate in to an age. i have one half written however i have incounter difficulties with dealing with leap years. perhaps soem one would know the solution . .. or just a premade script is fine > > > $test = strtotime ("January 12, 1944"); > $test2 = strtotime ("January 9, 1954"); > > $oneyear = 3600 * 24 * 365; > > $diff = $test2 - $test; > $ans = $diff/$oneyear; > > echo $ans; > > > > > > Thank You, > > Jon Yaggie > www.design-monster.com > > And they were singing . . . > > '100 little bugs in the code > 100 bugs in the code > fix one bug, compile it again > 101 little bugs in the code > > 101 little bugs in the code . . .' > > And it continued until they reached 0 > >
attached mail follows:
* Jon Yaggie <dmsales
design-monster.com> [010805 16:35]:
> does any one know where i can get a script that will convert a
> birthdate in to an age. i have one half written however i have
> incounter difficulties with dealing with leap years. perhaps soem
> one would know the solution . .. or just a premade script is fine
This is one of those problems that sounds easy ... until you get into it. It is leap years that make it messy. Try this ... it worked on all the dates I threw at it, and has options for whether you want just the year or a fraction, and the fraction can be decimal or days:
function age($birthdate) { // $birthdate can be most any format $bornUnix = strtotime($birthdate); $born = getdate($bornUnix); $todayUnix = time(); $today = getdate(); $last = array('year' => $today['year'], 'mon' => $born['mon'], 'mday'=>$born['mday']); $next = $last; if ($today['mon'] < $born['mon']) { // before birthday $last['year'] -= 1; } elseif ($today['mon'] > $born['mon']) { // after birth month $next['year'] += 1; } else { // in birth month if ($today['mday'] < $born['mday']) { // before birthday $last['year'] -= 1; } elseif ($today['mday'] > $born['mday']) { // after birthday $next['year'] += 1; } else { // happy birthday $next['year'] += 1; } } $age = $last['year'] - $born['year']; // set $yearFraction to TRUE if you want fractional days $yearFraction = TRUE; if ($yearFraction) { // set $yearDecimals to number of decimals desired $yearDecimals = 3; $lastUnix = mktime(0,0,0,$last['mon'],$last['mday'],$last['year']); $nextUnix = mktime(0,0,0,$next['mon'],$next['mday'],$next['year']); $daysThisYear = ($nextUnix-$lastUnix)/(24*60*60); $daysSinceLast = ($todayUnix-$lastUnix)/(24*60*60); if ($yearDecimals > 0) { // give decimal fraction $age += $daysSinceLast/$daysThisYear; $age = number_format($age,$yearDecimals); } else { // give actual fraction $age .= " " . number_format($daysSinceLast,0) . "/" . number_format($daysThisYear,0); } } return $age; }
-- Jan Wilson, SysAdmin _/*]; corocombtl.net Corozal Junior College | |:' corozal.com corozal.bz Corozal Town, Belize | /' chetumal.com & linux.bz Reg. Linux user #151611 |_/ Network, SQL, Perl, HTML
attached mail follows:
Could be! I assumed the literal meaning of proxy (by way of). Although I guess he will be the only one to ever know.;)
attached mail follows:
Could be! I assumed the literal meaning of proxy (by way of). Although I guess he will be the only one to ever know.;)
attached mail follows:
Hi.. It is not workable too... thanks.....
"Andreas D. Landmark" wrote:
> At 05.08.2001 12:49, Coconut Ming wrote: > >Hi > > I am having the problem in the coding below > > > ><? > > > >mysql_connect('localhost','123','123') or die ("Unable to connect to SQL > >Server"); > >mysql_select_db('Helpwatch') or die ("Unable to select database"); > > > >$temp = $username."watch"; > >$watchlist_query = mysql_query("Create Table "$temp"(WId int Not Null > >auto_increment, QId int not null, Primary Key (WId));"); > >?> > > > >but I can't do that.. Because of the syntax error, the coding I have > >underline is where the parser told me that is an error there. > >I have playing around with it for 2 hours and more... but I cant solve > >it.. Anyway help is greatly appreciated. > >Thanks in advance. > > Your underlining doesn't show verywell in plain text, but anyhow, your > line $watchlist_query ... is missing to .'s... > > Create Table "$temp", should be Create Table " . $temp . ", that way you'll > concatenate the string in the way you want them to (and the code should work). > > -- > Andreas D Landmark / noXtension > Real Time, adj.: > Here and now, as opposed to fake time, which only occurs there > and then.
attached mail follows:
Hello ! We could keep things simpler ... Why not give a try to this ?:
$watchlist_query = mysql_query( "Create Table $temp ( WId int Not Nullauto_increment, QId int not null, Primary Key (WId) )" ) or die ("Error ! Cannot create table !" . mysql_error() );
Hope it would work :o)
(At least the "mysql_error()" would show you the error code )
Arcad
"Coconut Ming" <coconut
maxis.net.my> wrote in message
news:3B6D32E6.6B47C76E
maxis.net.my...
> Hi
> I am having the problem in the coding below
>
> <?
>
> mysql_connect('localhost','123','123') or die ("Unable to connect to SQL
> Server");
> mysql_select_db('Helpwatch') or die ("Unable to select database");
>
> $temp = $username."watch";
> $watchlist_query = mysql_query("Create Table "$temp"(WId int Not Null
> auto_increment, QId int not null, Primary Key (WId));");
> ?>
>
> So.. in the above coding. I need to create a table. The table name
> should be a user-define name + "watch"
> I acquire the $username correctly and the variable $temp is working fine
> when I try to echo the value of it.
> Just say. I enter my username as coconut so I wish the mysql query to
> create a table called coconutwatch
> but I can't do that.. Because of the syntax error, the coding I have
> underline is where the parser told me that is an error there.
> I have playing around with it for 2 hours and more... but I cant solve
> it.. Anyway help is greatly appreciated.
> Thanks in advance.
>
> Sincerely
> Kok Ming
>
attached mail follows:
On Saturday 04 August 2001 00:02, Richard Lynch wrote: > Something like: > > select date_format('unix-timestamp', yoursessiontimestampcolumn) from > sessiontable;
SELECT UNIX_TIMESTAMP(yourtimestampcolumn) AS thetime FROM sessiontable; could be a bit faster
-- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/)Results 1 - 10 of about 201,000,000. Search took 0.08 seconds
attached mail follows:
On Thursday 02 August 2001 23:12, Daniel Goldin \(E-mail\) wrote: > Anybody know of any good project management scripts? Nothing too bloated. > Just a good simple way to organize projects and groups remotely. I've found > phpGroupware to be unwieldy and slow.
From a quick search at freshmeat.net (searched for php project)
http://udpviper.com/project.php?project=ipm http://www.awtrey.com/support/phppm/ http://www.phprojekt.com/
I haven't tested them, so no recommendations for you..:-(
I'm sure you can find more searching sourceforge.net
-- Kriheli Meir
attached mail follows:
At 02.08.2001 21:12, Daniel Goldin \(E-mail\) wrote:
>Anybody know of any good project management scripts? Nothing too bloated. >Just a good simple way to organize projects and groups remotely. I've found >phpGroupware to be unwieldy and slow.
Freshmeat certainly does...
http://freshmeat.net/search/?site=Freshmeat&q=project+management§ion=projects
--
Andreas D Landmark / noXtension
Real Time, adj.:
Here and now, as opposed to fake time, which only occurs there
and then.
attached mail follows:
ok, umm... you got that in pence cause im english.... just kiddin.... so what resources did you use to learn php?
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
----- Original Message -----
From: <billfarr
ages.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 02, 2001 1:18 PM
Subject: RE: [PHP] Spot the difference?
> Hokay, my 2p...
>
> I'm a (former) ASP programmer who just made the leap from ASP to PHP about
2
> weeks ago. A week ago I got my entire web-portal recoded to use PHP, a
move
> that experience tells me can't be done as quickly and easily with ASP.
All
> religious arguments aside, one must admit that (1) PHP is well documented
> and VBScript isn't (period); (2) PHP has many more USEFUL functions
built-in
> that are already debugged and working; (3) the examples one finds on
> php.net, phpbuilder.net, or any other knowledge base actually WORK and are
> usually pretty clear; (4) there is absolutely no question that PHP's
notion
> of security is truly secure, 100% in diametric opposition to IIS/ASP.
I've
> tested that to destruction and am confident enough in it to release PHP as
> an alternative language for my web-hosting customers.
>
> I cannot repose the same confidence in ASP--even less confidence when
Front
> Page extensions are wrapped around it. Note that I have never released
ASP
> as an alternative language for my customers and given its documentation
and
> security shortcomings, it's not likely to happen.
>
> Mind, I've used ASP for several years and am (unfortunately) intimately
> familiar with its shortcomings. Many of the string-manipulation functions
> inherent in PHP must be provided by third parties (like Vantage Point
> PowerStrings http://www.vpsoft.com) in order to do some tricky URL or
> input-cleaning routines. I challenge anyone to use M$'s mail objects with
> the same degree of security and reliability. Try and find real docs on
> VBScript -- there aren't any with any substance. M$'s site is useless as
> are the examples they give (which, by the way, NEVER work as
demonstrated).
> M$ should be taking notes from php.net on how to present and maintain
> documentation.
>
> Now, if a paying customer insists that I do work for them using ASP, of
> course that's what I'll use. But I strongly advise against it now, given
> the points above. With only a couple of weeks of PHP under my belt, I'm
> still confident enough in the language itself and the documentation around
> it that I will be able to do any web job that comes along. I might have
to
> have the manual at my side a bit longer, but as time goes on I find I
refer
> to it less and less. All in all, a very natural succession of events.
>
> Guess that was more than two cents...keep the change :-)
>
> Bill
>
> -----Original Message-----
> From: Matthew Loff [mailto:matt
willetts.com]
> Sent: Thursday, August 02, 2001 4:00 PM
> To: php-general
lists.php.net
> Subject: RE: [PHP] Spot the difference?
>
>
>
>
> I much prefer PHP, obviously... But posting to a PHP list isn't going to
> get you a very objective answer. I find PHP more versatile and easy to
> use, but an ASP programmer may tell you the same thing about ASP.
>
> Also-- try looking stuff up for yourself sometimes... I realize you're
> new to PHP, but at last count, you've sent 46 e-mails to this list in
> the past 10 days... 99% of your questions could be answered by going to
> the PHP manual, www.phpbuilder.net, or any of the FAQs that have been
> posted to this list in the past few days.
>
>
> -----Original Message-----
> From: Kyle Smith [mailto:dbzno1fan
hotmail.com]
> Sent: Thursday, August 02, 2001 8:42 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] Spot the difference?
>
>
> Well which is easier to program?
>
>
> -lk6-
> http://www.StupeedStudios.f2s.com
> Home of the burning lego man!
>
> ICQ: 115852509
> MSN: dbzno1fan
hotmail.com
> AIM: legokiller666
>
>
> ----- Original Message -----
> From: "scott [gts]" <scott
graphictype.com>
> To: "php" <php-general
lists.php.net>
> Sent: Thursday, August 02, 2001 8:45 AM
> Subject: RE: [PHP] Spot the difference?
>
>
> > ASP is basically like PHP, only it uses a VB-based
> > language instead of perl/c-based one.
> >
> > which means it sucks - vb is evil.
> >
> > > -----Original Message-----
> > > From: Jon Yaggie [mailto:dmsales
design-monster.com]
> > > Subject: Re: [PHP] Spot the difference?
> > >
> > > isnt this fact a good enough reason to believe it worthless???
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net To
> > contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net To
> contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi all,
I am curious about how to best define the size of fields in mysql. Is there some size that are better used than others?
For example without thinking about it to much I would tend to size fields in multiples of 10 - 20, 50, 100, 200 etc... Is this the best answer?
Regards,
Matthew Delmarter Web Developer
AdplusOnline.com Ltd www.adplusonline.com
Phone: 06 8357684 Cell: 025 2303630
attached mail follows:
I am looping through a few thousand records and would like to display the results every loop. Eg:
while($row = mysql_fetch_object($sql)): echo "Hi $row->name<br>"; flush(); endwhile;
A simple example - but you see what I am trying to achieve. Perhaps a more realistic example is displaying the results of a mail program as it fires off mail to hundreds of members in a database.
Will this slow down the execution of the script at all - or much?
Regards,
Matthew Delmarter
attached mail follows:
Here is an example of my code:
$text = "Hi ##firstname## ##lastname##,"; $text = ereg_replace("##([^#]+)##", $row->."\\1", $text);
$row-> is a result of using mysql_fetch_object. I would expect it to replace ##firstname## and ##lastname## with the value of $row->firstname and $row->lastname respectively... but nothing happens. I presume it is a variable problem...
Can anyone help with this code?
Matthew
attached mail follows:
Hi,
you'd better use preg_replace_callback() instead of ereg_replace in such case. function func($arr) { global $row; return $row->{$arr[1]}; } /* or something similiar, not tested btw */
$text = "Hi ##firstname## ##lastname##,"; $text = preg_replace_callback("/##(.+?)##/", 'replace_func', $text);
----- Original Message -----
From: "Matthew Delmarter" <matt
adplusonline.com>
To: "PHP Mailing List" <php-general
lists.php.net>
Sent: 2001. augusztus 6. 00:39
Subject: [PHP] using placeholders and db results
> Here is an example of my code:
>
> $text = "Hi ##firstname## ##lastname##,";
> $text = ereg_replace("##([^#]+)##", $row->."\\1", $text);
>
> $row-> is a result of using mysql_fetch_object. I would expect it to
> replace ##firstname## and ##lastname## with the value of
> $row->firstname and $row->lastname respectively... but nothing
> happens. I presume it is a variable problem...
>
> Can anyone help with this code?
>
> Matthew
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi all!
Im working with PHP and MySQL and I need to limit my records like 10 per page and Id like to have some sort of navigation like this: <prev> 1 2 3 <next>
Any takers?
Steph
attached mail follows:
Hello Steph, there is a real good example of what you what to do at phpbuilder.com http://www.phpbuilder.com/columns/rod20000221.php3 You might have to tweak it a little But it does work
Sunday, August 05, 2001, 3:56:38 PM, you wrote:
Steph> Hi all!
Steph> Im working with PHP and MySQL and I need to limit my records like 10 per Steph> page and Id like to have some sort of navigation like this: <prev> 1 2 3 Steph> <next>
Steph> Any takers?
Steph> Steph
-- Best regards, Richard mailto:rkurthpacifier.com
attached mail follows:
Salut, I have 1 little classe that does what you need here, http://www.pywebsolutions.com/source.php
py
----- Original Message -----
From: "Steph" <steph
goamerica.net>
To: <php-general
lists.php.net>
Sent: Sunday, August 05, 2001 6:56 PM
Subject: [PHP] Limit records/ prev/next links
> Hi all!
>
> Im working with PHP and MySQL and I need to limit my records like 10 per
> page and Id like to have some sort of navigation like this: <prev> 1 2 3
> <next>
>
> Any takers?
>
> Steph
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I am trying to pull a txt file into this purser so that it will add the data to the variables. Now the code below works if I just add an echo $message inside the while loop. But this is not what I want to do. I what it to run the while loop and after it is done pass the whole message to the mail program. I am trying to make this so a end user can customize the e-mail message to say what they want it to say. Without having to go into the code and mess with it. Also how can I add empty lines in the txt message so that it will space the message properly rather than have it bunch it all together
$fullname="Full Name";
$email="tester
doman.com"; pursing a text file
$hostdomain="domain.com";
$hostname="www";
$domain="test";
$tld=".com";
$baseip="234.444.44.444";
$username="rkurth";
$password="boat";
$userdatabase="testdata";
$newuser="test1";
$newuserpass="test1";
$sales="sales";
$fp=fopen("mail.txt","r"); while(!feof($fp)) { $buffer=fgets($fp,"1000"); eval( "\$buffer = \"$buffer\";" ); $message = $buffer; echo $message; <it will work if I add this echo but this is not what I want to do. } fclose($fp);
/* recipients */
$recipient = " $fullname <$email>";
//header
$headers ="From: Sales Department <$sales
$hostdomain>";
//subject
$subject =$sub;
/* message*/
/* and now mail it */ mail($recipient, $subject, $message, $headers); //print "$recipient, $subject, $message, $headers"; This is what mail.txt looks like
Dear $fullname,
Your webhosting account has been created. Please use the following data to log in:
Domain: $hostname.$domain$tld IP-Address: $baseip Username: $username Password: $password \n\n Mysql Database: $userdatabase Mysql Username: $newuser Mysql Password: $newuserpass
Thanks for choosing $hostdomain!
Best regards,
Richard
mailto:rkurth
pacifier.com
attached mail follows:
Sveiki, php-general,
I have win32, apache, PHP 4.0.6. I want to work with graphic files (GD). There is lines in my php.ini:
extension_dir = c:\php\extensions
extension=php_gd.dll I have this script: <?php Header( "Content-type: image/jpeg"); /* Header( "Content-type: image/gif"); */ $image = imagecreate(200,200); $maroon = ImageColorAllocate($image,100,0,0); $white = ImageColorAllocate($image,255,255,255); $green = ImageColorAllocate($image,0,100,0); ImageFilledRectangle($image,0,0,200,200,$white); ImageRectangle($image,10,10,190,190,$maroon); ImageFilledRectangle($image,50,70,150,150,$maroon); ImageJPEG($image); /*ImageGIF($image); */ ImageDestroy($image); ?>
But nothing hapens.... Where am I making a mistake? Help me, please
____________________________
2001.08.06, pirmadienis
Marius Pertravèius
iCQ: #125733984
Lietuva
xxx.lt
attached mail follows:
Hi,
I know this is a biggie, but has anyone attempted to write a spell check (preferably english) in PHP?
I'd LOVE something that can spell-check user-submitted text somehow, becuase I'm writing a fully dynamic news-based site, and the only downfall to the site could be bad content, since it's being supplied by writers world-wide, submitted dynamically.
My other option is to have an editor approve each article before publishing, but I thought i'd at least ASK if nyone's attempted it.
Justin French
attached mail follows:
On Mon, 6 Aug 2001, Justin French wrote:
> Hi, > > I know this is a biggie, but has anyone attempted to write a > spell check (preferably english) in PHP? > > I'd LOVE something that can spell-check user-submitted text > somehow, becuase I'm writing a fully dynamic news-based site, > and the only downfall to the site could be bad content, since > it's being supplied by writers world-wide, submitted dynamically. > > My other option is to have an editor approve each article > before publishing, but I thought i'd at least ASK if nyone's > attempted it. > > Justin French > >
attached mail follows:
On Mon, 6 Aug 2001 12:02, Justin French wrote: > Hi, > > I know this is a biggie, but has anyone attempted to write a > spell check (preferably english) in PHP? > > I'd LOVE something that can spell-check user-submitted text > somehow, becuase I'm writing a fully dynamic news-based site, > and the only downfall to the site could be bad content, since > it's being supplied by writers world-wide, submitted dynamically. > > My other option is to have an editor approve each article > before publishing, but I thought i'd at least ASK if nyone's > attempted it. > > Justin French
You can configure support for aspell at compile time. From configure --help
--with-aspell[=DIR] Include ASPELL support.
And the functions available:
http://au2.php.net/manual/en/ref.aspell.php
Maybe something there will do what you want.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIANot a computer nerd; merely a techno-weenie.
attached mail follows:
Justin:
IMHO it would be very difficult to build/use a reliable spell checker that worked automatically. Natural languages are just too complex and ambiguous. Look at how often something like Word or Star Office gets things wrong. 'Hare' is not spelled wrong unless you meant to write 'hair', for example. And spell checkers can't deal with scrambled syntax, etc.
Go for a human editor if you want something approaching 100% reliability.
Mick
On Mon, 06 Aug 2001, Justin French wrote:
> Hi,
>
> I know this is a biggie, but has anyone attempted to write a
> spell check (preferably english) in PHP?
>
> I'd LOVE something that can spell-check user-submitted text
> somehow, becuase I'm writing a fully dynamic news-based site,
> and the only downfall to the site could be bad content, since
> it's being supplied by writers world-wide, submitted dynamically.
>
> My other option is to have an editor approve each article
> before publishing, but I thought i'd at least ASK if nyone's
> attempted it.
>
> Justin French
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- Michael Hall mulga.com.au adminmulga.com.au ph/fax (+61 8) 8953 1442 ABN 94 885 174 814
attached mail follows:
Hello All, writing to a flat file I am getting 500 error with Apache. I know the path is correct and when I delete the file.txt and try to write to it. A new file is created but no writing. What does Premature end of script headers: mean?
TIA Gary
attached mail follows:
> Hello All, > writing to a flat file I am getting 500 error with Apache. I > know the path is correct and when I delete the file.txt and try > to write to it. A new file is created but no writing. What does > Premature end of script headers: mean?
It usually means the execution of the script aborted in a way that Apache wasn't expecting - I'd say something has gone seriously wrong in the script, you might want to add a few debugging statements and see from there where a problem may lie.
Jason
attached mail follows:
Ya, I may have to.. I can't seem to get this to work.
> I think it's time for you to submit a bug report at
http://bugs.php.net
> unless one of the developers expressly described why it shouldn't
work...
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-
e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> ----- Original Message -----
> From: Corey Chapman <ze0
xnull.com>
> To: Richard Lynch <ceo
l-i-e.com>; <php-general
lists.php.net>
> Sent: Friday, August 03, 2001 10:19 PM
> Subject: Re: [PHP] Re: fopen a URL with = in it
>
>
> > So you're saying that I should be able to pass the = sign in just
fine
> > into the fopen call with no errors? I understand what you mean that
if
> > = was what the variable was defined as, then THAT is where I'd use
> > urlencode ;) I wasn't too sure about that, but now I am.
> >
> > Quite odd that it reports errors then when passing in an = sign.
> > Perhaps PHP does not like to load url's like that..
> >
> > > You would only want URLEncode if "thething" had the "=" in it as
part
> > of the
> > > data...
> > >
> > > "http://whatever.com/foo.php?operand=" . urlencode("=")
> > >
> > > might be a URL for math geeks to talk about the "=" sign :-)
> > >
> > > --
> > > WARNING richard
zend.com address is an endangered species -- Use
> > > ceo
l-i-e.com
> > > Wanna help me out? Like Music? Buy a CD: http://l-i-
> > e.com/artists.htm
> > > Volunteer a little time: http://chatmusic.com/volunteer.htm
> > > ----- Original Message -----
> > > From: Corey Chapman <ze0
xnull.com>
> > > Newsgroups: php.general
> > > To: <php-general
lists.php.net>
> > > Sent: Friday, August 03, 2001 1:45 PM
> > > Subject: fopen a URL with = in it
> > >
> > >
> > > > Something that's been driving me crazy for a few days. Could it
> > > > be a bug in PHP?
> > > >
> > > > Using the fopen function (or even the file function), I want to
> > open a
> > > > web page for read. Sounds easy? Well, say I want to have an "="
> > sign in
> > > > the URL.. well that is where the problem comes. I have tried
things
> > > > like this:
> > > >
> > > > $eq = urlencode("=");
> > > > $URL = "http://www.something.com/file.php?
thing".$eq."thething";;
> > > >
> > > > I have tried many other combinations as well.. the problem is
this:
> > > > when PHP calls fopen(), it does not allow the = sign in the
variable
> > > > passed in. So I figured I should escape it..
> > > >
> > > > fopen("http://www.something.com/file.php?thing\=thething","r";);
> > > >
> > > > But that did not work either. It allows me to pass it in, but
then
> > it
> > > > tries to open the literal \= in the url, which of course doesn't
> > > > exist. The url has just an =. I thought encoding the whole or
part
> > URL
> > > > would work. well it loads the page, but the page itself doesn't
> > > > recognize the encoded = sign as being an = sign..
> > > >
> > > > Bah! Anyone have any ideas.. ?
> > > >
> > > >
> > > > Corey Chapman
> > > > Xnull CEO
> > > > (Chat with us: http://forum.xnull.com)
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail: php-list-
> > admin
lists.php.net
> > >
> > >
> > >
> >
> > Corey Chapman
> > Xnull CEO
> > (Chat with us: http://forum.xnull.com)
>
>
>
Corey Chapman Xnull CEO (Chat with us: http://forum.xnull.com)
attached mail follows:
Is it possible to have a form submit button call a function. Like for updating a record in a database or for deleting data. Rather than a new page or with PHP_SELF
Best regards,
Richard
mailto:rkurth
pacifier.com
attached mail follows:
AFAIK the function would always need to exist inside a php file. That file doesn't necessarily need to be a `page' (ie. print any HTML). Just make the ACTION of the form point to the file with your function in it (or a call to the function).
Mick
On Mon, 06 Aug 2001, Richard Kurth wrote:
> Is it possible to have a form submit button call a function. Like for
> updating a record in a database or for deleting data. Rather than a
> new page or with PHP_SELF
>
>
>
>
>
>
>
>
>
>
>
> Best regards,
> Richard
> mailto:rkurth
pacifier.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- Michael Hall mulga.com.au adminmulga.com.au ph/fax (+61 8) 8953 1442 ABN 94 885 174 814
attached mail follows:
I am trying to install phpAdsNew on my site now, have trouble understanding on the configuration bit. I basically am able to set up database and tables as pre documentations said. And I have managed to login to admin part successfully.
Anyway, I got stuck with the part, that I don't see where I can make the phpAds track the click on each images on my site, is there anyone who ever used this software can give me some clue?
Jack
jacky
activelifestyle.com
"Love your enemies, it will drive them nuts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]