town in the north of
England.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
on the web site until it has been reviewed by a
human editor?
Looks like the best solution possible.
If the OP is interested I will see if I can get our content filter word list
from the network manager here... no promises though.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net
Hi Sean,
if you want a partial list of offensive terms - try looking
at the meta keywords on a few porn sites ...
Excellent idea!
Unfortunately I'd have to explain that to my boss... No, really, I'm doing
some research...
Cheers
Jon
--
PHP General Mailing List (http://www.php.net
to
such sites anyway?
Nope, only the really offensive ones like
http://www.thisisscunthorpe.co.uk/index.jsp ;-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Rodrigo,
Hi guys I need a way to know how to know from wich
page the visitor came
echo $_SERVER[HTTP_REFERER];
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Diana,
After I run a query lik this,
$db-query($sql);
what is the quickest way to find out how many
records result?
Look into mysql_num_rows (or the equivalent if you're not using MySQL)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Hi Shane,
I can pass variables till I am blue in the face, even
see them in the URL but they are still showing up as (!isset)
Are you accessing these variables through $var or $_GET[var]?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
scripts - these are the ones that get run many times on a daily basis and
always look the same - and Crystal installed on the managers' PCs for ad hoc
reporting.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Luke,
I'm trying to find out how to run a command on the
server as root. Does anybody know how to do this?
How about using a combination of exec() and sudo (assuming you're in the
sudoers file, that is)?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
- shout if it doesn't work.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Joskey,
Who can tell me the best php-base webmail?
IMP (http://www.horde.org/imp/) is pretty good, I use it for my webmail and
don't have any complaints.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- cron
under unix/linux, or task scheduler in Windows. I usually trigger the script
with lynx and pipe it to /dev/null, but if you have PHP compiled as a
standalone instead of a server module, you could call it directly.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
:
code
break;
case what's new:
code
break;
}
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Paul,
I just need to know how to get the url of the page
calling the function so I can delete the information
from the appropriate table.
Does $PHP_SELF not give you what you're after?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Hi,
Are you interested in this?!
New generation of PHP Program, reaction to ASP.NET
I saw it when you posted it yesterday and tried it out, but it didn't work
for me. I imagine this is because I've disabled Javascript.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net
, it would be helpful if you could post the code for this script.
Without seeing it the only thing I can suggest is you minimise the amount of
string concatenations, as this is a fairly expensive operation.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Hi,
I want to take an array and get the soundex() for each element
in that array and return the results into another array.
How about:
$color = array(blue, green, orange, purple, red, yellow);
$soundex = array();
foreach ($color as $foo) {
$soundex[] = soundex($foo)
}
HTH
Cheers
Jon
should stay *well* away from
http://zenithtech.com/ - they're without a doubt the worst host I've ever
used.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and paste as well. Read the
user comments as well, as they will answer questions that will inevitably
come up.
Stage 2 - well, you're on your own, but there should be something on your
hard drive that's suitable.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
://www.google.com/search?q=airport+codes
^
(note similarity of search phrase to subject line of this message)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
into.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to solve this, but I'm curious as to why you don't want to
use mt_rand:
?php
for ($i=1; $i=6; $i++)
$x[] = mt_rand(1, 90);
foreach ($x as $current)
echo $current. br /;
?
You still get an array at the end of it, which seems to be what you're
after.
Cheers
Jon
--
PHP General Mailing List
.
That's not a problem: just add a couple of lines to test for existence:
$i = 0;
while ($i6) {
$pick = mt_rand(1, 90);
if (!in_array($pick, $x)) {
$x[] = $pick;
$i++;
}
}
But if this is the only solution I'll do it in this way.
It's *never* the only solution :-)
Cheers
Jon
--
PHP
/features.file-upload.php
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Remon,
I try this script with php, but i found an Error.
It would be helpful if you could show us this error message.
$vary(100);
At the very least, you should change this line to
$vary = array();
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
number. Reading from
left to right:
book 1 : yes
book 2 : no
book 3 : yes
book 4 : yes
book 5 : no
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
). ...;
?
Read all about it at http://php.net/substr
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
() function.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
simple code that
doesn't.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
don't want this to happen, use GET instead of POST for your form.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
+replace+outside+html+tags might be a
good way for you to pass the time while you're waiting for Jay to write your
program ;-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
possibility a session can be hijacked.
Can someone send me an example of good login code.
Sure:
http://zend.com/zend/tut/authentication.php
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
://www.php.net/manual/en/configuration.changes.php
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
DocumentRoot /var/www/html/mysite
php_value register_globals 0 (or 1 for on)
/VirtualHost
Yup, or even in directories:
Directory /var/www/html/mysite/foo
php_value register_globals 0
/Directory
Which might be handy if you're updating scripts on a live site.
Cheers
Jon
--
PHP General
:-)
You have got an AccessFileName .htaccess directive, right?
You might like to try asking in
news:comp.infosystems.www.servers.ms-windows, or hanging around here until
an Apache guru turns up...
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
a session hijacked, you can limit any damage by good app
design: for example, don't stored passwords in the session and then have a
header at the top of every page saying hello $username, your password is
$password :-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Hi Jason,
Remember those bubbles windows php.net used to have?
What are those actually called? Any tutorials that
show how to make them?
http://www.php.net/manual/en/faq.misc.php#faq.misc.popup
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
, you probably want to look into $_SERVER[SERVER_ADDR].
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
)) {
echo pYou're using netscape 4./p;
}
Seems to work OK.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
();
$randomC = mt_rand();
Just once? Or each time the page gets reloaded?
Uh... same thing, surely?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
. AIUI the call to mt_srand() lasts for the lifecycle of
the script.
Was that what you meant?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
numbers you need
something like a decaying radioactive material as your seed source -
http://www.fourmilab.ch/hotbits/ provides exactly this, so you could always
get your seeds via the web :-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
://www.zend.com/codex.php?id=31single=1
but I haven't used it myself.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/test.php
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
what you
want through that. There's a great article on this at alistapart:
http://www.alistapart.com/stories/succeed
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?
There should be some on that page.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Where can I found last version of the GD library ?
http://www.boutell.com/gd/
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to the apache directory, I put
it in the WINNT! But that just did nothing!
It might be WINNT\SYSTEM32 or WINNT\SYSTEM - give those a go (check the
instructions again to make sure).
Don't forget to restart Apache after making any changes to your PHP setup.
Cheers
Jon
--
PHP General Mailing List
Hi,
when is this being implemented ?
Go and ask on the MySQL list. Version 5 was the last I heard.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
the first if you need it for filesystem access
- Use the second if you need it for URLs
- Use two if you need both
- Forget these and use PHP's predefined variables for this info
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
this, use
javascript, but bear in mind that many people have it disabled - you might
want to back it up with a server-side calculation as well.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I've just read on MSDN that ASP sessions only work if
the client has cookies enabled, Is that true for PHP as well.
No, not if you have session.use_trans_sid = 1 in your php.ini.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
but not on email thing is probably down to the fact
that \n on its own should work on screen - the \r is ignored.
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Marek,
safe enough would be to put this at the begining
if(!ereg('^[0-9]+$',$song) {
die('Sorry...')
}
Sure, but why incur the expense of using the ereg() parser? If you're only
ever going to be testing whether $song is a number or not, use
http://php.net/is-numeric.
Cheers
Jon
\n;
}
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Rick,
How can I combine that line of code with
str_replace() or some other replace function
in order to turn \n into br for each line.
I think you're looking for http://www.php.net/nl2br. Specifically:
for ($i = 7; $i sizeof($info); $i+=1)
echo nl2br($info[$i]);
Cheers
Jon
still going to get stuff that isn't right, so make sure
(a) you validate the contents of $ip before doing anything with it, and (b)
you're not using it for anything critical.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Doug,
where can i find info on setting up a mysql
database on a remote server? i know how to
set them up on a local machine, but i can't
figure out how to get to the command line
setting on a remote server...
me@mybox:~$ ssh my.remote.server
Or am I missing something?
Cheers
Jon
Hi Jay,
Does anyone have a good php script that will
test (i.e. benchmark) my MySQL machine and my
Web server?
Give ab a go - it comes with Apache, you should find it in your bin/
directory.
man ab for all the gory details.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net
daylight saving is in
effect, so you're unlikely to get the correct time from it ;-)
Give either date(h:ia) or date(H:i) a try - these are 12-hour and
24-hour times respectively.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
them up.
Try this:
function calculate_money($sum)
{
// do stuff
return array($type, $amount);
}
list($type, $amount) = calculate_money($whatever);
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
no match;
}
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
with the other suggestions to check your $query variable, you should
change this line to :
$db = mysql_pconnect($whatever);
The goes in front of the function call, not the variable, if you want to
suppress any potential error messages generated by the function.
Cheers
Jon
--
PHP General Mailing
(not sure).
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
to submit dodgy data.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
in the javascript
function that checks the email.
function checkEmail(email)
{
// do the check however you like
// create a variable called check
// that's either true or false,
// then do something like:
if (check) {
return true;
} else {
return false;
}
}
HTH
Cheers
Jon
Hi list,
What are peoples' thoughts on one should always return a value from a
function, even if it's always going to be true?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
was a constructor like this:
class foo {
var $timestamp;
function foo () {
$this-timestamp = mktime();
}
}
I just can't see any reason to return anything from it, unless someone wants
to tell me otherwise...
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
the ID of B
4. LastID B returns the ID of B
Whoever did insert A would receive the wrong ID.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
checking first to make sure that a row containing this token isn't
already in the table.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
If it's from MySQL I'd suggest using an ENUM('y','n') or a TINYINT field
instead, but I suppose you could test for things like empty or zero-length
strings.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
have a look.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a very poor experience with them.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Anil,
What version combinations of php and mysql should be used?
PHP 4.2.2 is the latest and is highly recommended.
For MySQL it depends somewhat on which features you need - if you can live
without the stuff in the 4.x versions, you're probably best off with
3.23.52.
Cheers
Jon
see you hitting is reading the contents of the
user's hard drive... usually this is impossible, for good reasons.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
}
?
/tol
I don't usually use mysql_fetch_object so I'm not sure if you can walk
through it with foreach() though...
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
perfectly
(ie I don't need to pass the password-fd bit.)
If I use exec, I get the same results.
I'll add the implode bits and try that.
Regards,
Jon
On Saturday 31 Aug 2002 01:06 am, Richard Lynch wrote:
Hi,
Appologies if this comes through twice. I tried to post it via goolg
groups but it didn't
, If I add #!/usr/bin/php to the top of the script and make it
executable, then su to 'nobody' (which appache runs as) then the
script runs perfectly from the command line - so I think that the
permissions are all OK.
Any ideas where I'm going wrong?
Regards,
Jon Lawrence
--
PHP General Mailing List
])
{
connectToDB();
}
}
function connectToDB()
{
...
The master_session variable is not set and hence connectToDB is never
called.
If I place the checkMaster code in each page that includes this file then it
all works fine. How do I get round this?
Thanks.
jon
I've been reasonably happy with postnuke -- easy to go in and modify stuff
yourself.
htp://jonroig.com
... but maybe that's just me. I'd actually be curious as to what kind
experience people have had with the other systems.
-- jon
-Original Message-
From: jaxon [mailto:[EMAIL
Hey...
Want to meet other PHP developers in your area? Check out:
http://php.meetup.com/
Pretty nifty idea... especially given the lack of user groups in the U.S.
-- jon
-
jon roig ([EMAIL PROTECTED])
developer, openRealty
http://jonroig.com/freecode/openrealty/
--
PHP
Nope... didn't crosspost anywhere... (I'm only subscribed to the general
list.)
My problem is similar -- I'm in Philadelphia and there doesn't appear to be
a group here at all. There's some crossover with the local linux users
group, but not a lot.
-- jon
-Original Message
I have one:
http://jonroig.com/freecode/openrealty/
-- jon
-
jon roig
project manager
openlistings
-Original Message-
From: César Aracena [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 1:50 PM
To: PHP General List
Subject: [PHP] Buy Sell
Hi all
interprete the? correct.
Is there anything really basic here Im missing...
/Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of the lists at http://mysql.com/.
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, 1, 2002));
?
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Jeroen,
Where i can find more help about cache control
Here: http://www.google.com/search?q=help+about+cache+control (495,000
results)
Or did you mean something a bit more specific?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
not be exactly what you're after, but it's probably:
meta http-equiv=Pragma content=no-cache
meta http-equiv=Cache-Control content=no-cache
meta http-equiv=Expires content=?=$a_GMT_date_in_the_past?
;-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
the 31st today, and any months that don't have 31
days were getting screwed up (wouldn't mind hearing any other ideas though).
It seems like it's always a good idea to pass at least the day parameter to
mktime(), unless you enjoy unpredictable results ;-)
Cheers
Jon
--
PHP General Mailing List (http
are
configured to ignore your caching instructions anyway.
Cheers
Jon
PS. Please try and avoid using HTML mail on lists.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
range can be free to
$600ish. Any suggestions? I can't use any web/hosted cgi, bablyfish, type
applications. It has to run on my server.
Thanks
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi JJ,
What php functions should I use to convert a UNIX timestamp
to a human - legible format and back again?
gmdate()/date() and mktime()/gmmktime() (depending on whether you need to
calculate them as GMT or not)
HTH
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe
Hi Roy,
what function in PHP like
response.redirect http://www.detik.com; in ASP?
header (Location: http://www.detik.com/;);
HTH
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi Henry,
Is this possible?
yup.
Set your cron job up as lynx -dump http://www.myserver.com/myscript.php
/dev/null (or pipe it to a logfile if you fancy) - obviously, you'll need
lynx installed for this to work :-)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net
for it - personally I always
use it as a module, and I find using lynx works perfectly... if it ain't
broken, don't fix it...
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
People, hope you can help. The below IF statement is getting a PARSE error.
Can anyone spot why?
Cheers.
Jon
if (($this-checkReferralCB($this-benefitRef, $this-benefitNo,
$this-childDOB))
(!$this-checkLocation($this-post, W)) (!empty($this-childDOB)))
|| ($this-checkPregnancy
)
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
?php
echo hi;
?
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
://www.google.com/search?q=only+get+255+characters+from+mssql
Cheers
Jon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sounds like desired behavior to me. I would think that you may be able to
change the password, but aren't allowed to retrieve its value.
Cheers
-Original Message-
From: J. Anderson Scarbrough [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 3:03 PM
To: [EMAIL PROTECTED]
501 - 600 of 1075 matches
Mail list logo