well when you were using echo $name to test then you were outputting html,
hence no redirect... if your php is set up in such a way as to suppress
errors then you wouldn't have been warned about it..check that nothing else
is being outputted, eg a space before the first ?. If that doesn't fix it
One observation on this.. there is a major difference between this and the
the header(location:...
header happens on the server side whereas the below is clientside and
therefore unreliable. I know that netscape, particullarly on unix, is bad
for ignoring this. header() is the only reliable way
There is an open source WAP/SMS gateway, Kannel.. altho the project has gone
thru some problems of late (the company who all the main developers worked
for has gone bankrupt :-( )
Bear in mind tho you can't send for free, you will need to install a modem
of sorts into the computer and have a
A fairly detailed disucission, altho slightly out of date
http://php.resourceindex.com/Documentation/Reviews_and_Analysis/PHP_vs._ASP/
and one on the dangers of advocacy
http://www.perl.com/pub/a/2000/12/advocacy.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail:
Depends what is to happen to the array afterwards, but in general no.
An interesting thing is to put timing method calls around a block of code in
question, you will find something like this (depending upon size of db)
takes somehting like 0.005 seconds. Timing things can be useful measures of
a
Just to throw one more unwelcome cat amongst the pigeons..
Different countries/time zones have summer time, I think almost all
countries do, but the actual days when they switch vary from country (yes I
know, bloody nusiance isn't it?)
I know as an example of this theres about three weeks of
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.
--
PHP General Mailing List (http
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
, which explains why the variables were as they were and why the
status was 401 rather than 404.
Obvious really when one thinks about it.
Thanks for you advice tho tim, much appreciated.
Tom
- Original Message -
From: Tom Carter [EMAIL PROTECTED]
To: Tim [EMAIL PROTECTED]
Cc: [EMAIL
Use three tables, one from projects one for members one for assignments
Projects
projectid
projectname
length
description
and whatever else
members
===
memberid
name
category
workingon
memberid
projectid
so each member can be in one or many
Hi All,
Does anyone have any experience with registering sites on the major search
engines? I have a number of questions I hope to find help with (and please
do excuse that not all of them are directly PHP related)
-Do search engines treat .html and .php files differently in caching etc?
-I
Hi All,
This is something I have working nicely now, and I know theres been posts on
here before without any satisfactory answer, but this eeems to cover all.
When you have a script that returns a file, you obviously want to return a
file which looks right.
Ths initially simple looking way of
Generally I would expect one of two possibilities in this scenario..
either
a) you are passing thru the url (limited I believe to about 255
characters)...if so use a form with METHOD=post
or
b) you are storing in a DB and the size of the field in the db is too small
(in general most rdbms' will
Try readin the manual before posting.. all you want is the string
concatenation operator .
PHP is weakly typed so no direct conversion is needed
echo balalala . trim(odbc_result($result_id,3)) . aasasasas
Sorry for the dummies question, but how do I insert into string like:
echo balalala
What you are looking for isn't a php function, but a module in apache called
mod_rewrite..this is usually installed in most apaches, if not can be done
easily.
so in the stie .htaccess (or indeed in the master conf) you would do
something like
RewriteEngine On
RewriteRule ^/login/[a-zA-z0-9]*
Another point is to remember that each page request may come from a
different IP address.
For example, where I work in IBM, every out going connection goes from one
of 30 or so boxes, each with their iwn IP, so in the process of browsing a
site each request for a file can come from one of those
Hi All,
I was wondering if there exists, either in PHP (I can't find anything) or
something someone has written (again, my searches have been fruitless) to
convert non-english european characters to the english equivalents eg å to a
etc.
TIA, Tom
--
PHP General Mailing List
The best way of doing this is to name the fields catid[]
The [] means that they are inserted into an array in the order they appear
on the page, so on the page with deals results you just have to cycle
through the array.
As a side point, there is no way of telling what has been modified and what
In my experience Scandinavia (well nordic really, can't forget finland) and
germany (and a few other european countries...notably not england) are much
more open to open source (no pun intended) to open source and the like..
their concerns are sensible ones. Something in the mentality. northern
hi all
I was wondering if anyone had found a solution to the problem of cropping a
string to a certain length...however a certain length based upon the actual
size of it. By this I don't mean after n characters, or even after m words
(have a function for this already)... what I'm looking for is
length and takes the last word (or pastial word) off.
you might want to take a look at wordwrap() too, probably not what your
looking for though.
--
Chris Lee
[EMAIL PROTECTED]
Tom Carter [EMAIL PROTECTED] wrote in message
01ea01c1243c$36fd1d40$0a00a8c0@bjorn">news:01ea
In addition to this you can place the file out of the web tree PHP can,
AFAIK, include files based on their absolute file path, eg /home/config.inc.
This means that there is no way to directly browse to a file
(web tree is the part of a server/whatever that the webserver (eg apache)
uses to
Andrew/All,
Following on from this I am interested to find out some performance
comparisons/opinions of
storing files in a db vs. storing in the file system and being redirected by
php
I think I've heard from elsewhere that file system is more effecient.
The sistuation storing is pretty
There was a long discussion on this in a java forum I am part of, the
product of which was basically this...
1. All variables in a class are best left to be private (not sure PHP has
this, but the programmer can work the principle in mind.. that is only the
class can access them).
2. Generic
Chris Lambert wrote:
MySQL is easier to use and faster to develop with for 90% of web
applications. Sure, PostgreSQL has some huge advantages, but not
everyone
needs the same thing.
easier to use ? I'm not sure why anyone would say that
faster to develop ? nope - I find postgresql
You can achieve the same effect by using left and right
- Original Message -
From: Seb Frost [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 3:12 PM
Subject: [PHP] MySQL substrings?
This is thew sort of thing I want:
SELECT * FROM table ORDER BY
-
From: Tom Carter [EMAIL PROTECTED]
To: Seb Frost [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 10:32 AM
Subject: Re: [PHP] MySQL substrings?
| You can achieve the same effect by using left and right
| - Original Message -
| From: Seb Frost [EMAIL PROTECTED
could still access them directly. You could also design
properties
that were read only as well. Perhaps this is because of operator
overloading??
-Original Message-
From: Tom Carter [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 19, 2001 2:19 AM
To: Andrew Libby; Joe Sheble
I could be wrong in thinking this, but wasn't the purpose of the presented
function to shuffle a deck in a deliberately imperfecatly random way? ie.
mimicking a human shuffler beats why one would want to do this as an
academic excersize, but hey, I like it ;-)
- Original Message -
It's not possible to be assured of doing this properly for the following
reason..
1. not all hosts translate to IP address
2. Soem host names are often meaningless (eg .com)
The way to do it is basically this
1. use gethostbyaddr() (http://www.php.net/gethostbyaddr) to do a reverse
DNS from IP
for certain functions to run can I have both co-existing?
I guess what I want is a copy of php running completely separate to
apache, ie as a standalone app. any help much appreciated!!!
Tom Carter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
php can act as a server in many respects, it can handle sockets, some
streams etc. so the the answer is yes, you can connect to it from
anything. (for instance I'm currently building a plugin to Lightwave that
connects to php)... programs commonly use http to connect (it's simple then
A much better way of doing this would be use to mod_rewrite. an apache
module that basically applies regular expressions to urls
This would give you a way of avoiding passing variable but without resorting
to the work around of 404
- Original Message -
From: Sondra Russell [EMAIL
I agree with the point about the spec of machine... a lot of comparisons are
made using machine where the spec of the machine ends up being the
bottleneck.
Also, PHP is more tolerant then say JSP in the code you write, it is
possible to write some really bad php apps which work albeit very
then it should probably be
SetCookie(bilderanzeige,\$bilderanzeige\,time()+3600*24*30,/,,0);
as a general rule, only numerics can get away without being surrounded in
quotes
- Original Message -
From: Jochen Kaechelin [EMAIL PROTECTED]
To: PHP General List [EMAIL PROTECTED]
Sent: Friday,
Also remember PHP has a maximum execution time (normally 30 seconds) so you
will need to overwrite when running the script.
- Original Message -
From: Kath [EMAIL PROTECTED]
To: Fotwun [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 12:39 AM
Subject: Re: [PHP]
Just to expand slightly on this answer...
think back to days at school, you order works as so aardvark, abbey,
accoustic, ie you compare rightmost letters, if they match then compare the
next letter along until you find a difference... this is what your sort is
doing. It doesn't think 1 and 10
ichange that line to
if($weight[$i]) $percentage[$i] = $totaal[$i] / $weight[$i];
All tho this does mean that if $weight[$i] is zero then $percentage will be
as well
HTH, Tom
- Original Message -
From: Bart Verbeek [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Friday,
You also seem to be missing a closing }. please check all braces before
posting to a list...
- Original Message -
From: Nikola Veber [EMAIL PROTECTED]
To: php forum [EMAIL PROTECTED]
Sent: Friday, September 07, 2001 1:29 PM
Subject: [PHP] code troble
Hi
I'm having trobles with
This really doesn't work well to say the least... I've had endless problems
with it, and basically just using headers there is no great way to to it.
The best solution I found is to use the mod_rewrite module in apache to map
a url onto the script.
- Original Message -
From: Franklin
Thanks for that helpful email george, it's something I've been looking at as
well.
In a situation I'm tackling now I've rewritten the core part of the access
such that it is dependant upon data recieved from the server, rather than
the server being dependant upon data from access. So far it
Simplest way is to do this
$string = my string;
$string=urlencode(str_replace( ,+,$string));
ie use str_replace to manually replace spaces with +, urlencode then won't
do anything further to it
- Original Message -
From: Brandon Orther [EMAIL PROTECTED]
To: PHP User Group [EMAIL
The problem comes if you use php to generate xml documents in xml you
use the tag ?xml.. if php is setup to handle ? then it takes that then
throws a parse error as it attempts to read the xml bit.
Simplest solution if you are using php to generate xml tags is to always use
php to generate
PHP is probably compiled as a module.. if you want to be able to compile php
to use on command line you need to compile a second version (yes you can
have two) without all the apache configure options (ie only things like
mysql as and when needed)
- Original Message -
From: ReDucTor
rough outline of what you would need to do.
this is pseudocode.. I'm too tired to write correct php :)
$is_first=true;
whlie(get next result entry) {
if($is_first) {
$last-date=date of this entry;
$this-date=date of this entry;
$is_first=false;
}
] . brbr . $myrow[news]
.
brbr;
}
$lastdate=$thisdate;
}
?
I wasn't sure how to assign the $lastdate and $thisdate variables.
- Original Message -
From: Tom Carter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, September 12, 2001 9:37 AM
Subject
maybe I'm wrong, but don't you need a return value?
- Original Message -
From: Christian Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 08, 2001 2:24 AM
Subject: [PHP] is PHP crazy, or am I?
whats wrong with the code below?
function bubblesort($vetor,$tam)
I'm very intruiged how you have got this to work it was my understanding
you needed to be running a server, such as kannel, and have a contract with
an smsc?
Is this so?
- Original Message -
From: Lewis Bergman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent:
Thats the standard, but because of the other systems involved in delivering
msgs then I don't think it possible just to do that without the co-operation
of a third party smsc.
I really hope I'm wrong tho...
- Original Message -
From: nico_oreka [EMAIL PROTECTED]
To: Tom Carter [EMAIL
for those who are interested there is a good wap/sms server, open source and
generally funky kannel (kannel.3glabs.org)
It's all you need to server wap, but sms does requrie a contract (=cost
money) with a service centre
- Original Message -
From: Tom Carter [EMAIL PROTECTED
The question really for me is this...are they caches of results? in other
words, slightly old information? Or can they still be used in the same way
as a raw script and still be improved?
- Original Message -
From: Andreas Gietl [EMAIL PROTECTED]
To: Alex Ranaldi [EMAIL PROTECTED];
On Tue, 8 May 2001, E. Stuart Hicks wrote:
I see that there is support for bzip2 and gzip in PHP, so I was wondering if
there was any standard zip support that I'm not seeing.
I looked and couldn't find any. The best I could find to be able to zip
unzip files was to save them on the server
The problem is that it matches the first foo with the first /foo and the
second foo witht eh /foo ( andmatches those properly) but it also matches
the first foo with the second /foo (thisnk of the logic of the regex).
What you need to do is rather than specify any character (.*) specify any
I don't have any direct experience using it, but colleagues I know have
given it great reviews.
ASP2PHP script (nice name ;o) )
http://asp2php.naken.cc/
Tom Carter
Web Architect
roundcorners ltd.
On Wed, 9 May 2001, Brandon Orther wrote:
Hello,
I am looking at a complete database
If you know what page(s) are being used to load the end page then on these
pages you could pass the $HTTP_REFERER value from the middle page to the
end one and use that in the redirect
Tom Carter
Web Architect
roundcorners ltd.
On Fri, 11 May 2001, Johan Vikerskog (ECS) wrote:
Hi Ben.
I need
not I might add!
Any advice and past experience would be very welcome.
BTW, my system is apache on linux, php 4.0.4pl1 running on a cobalt raq.
Thanks in advance
Tom Carter
Web Architect
roundcorners ltd.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
Only a small little problem.. you called your sql query $sql and then in
your mysql_db_query line called it $sql_query..call them both the same name
and it should work!
HTH,Tom
- Original Message -
From: Todd A. Jacobs [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Tuesday,
I have come to a situation where i am having a variable inside another
variable.
for example.
$rm_$cat_adt
PHP would read this as trying to prepend the variable $cat_adt to the
variable $rm_
You seem to be trying to insert the variable $cat into the middle of a
variable.. possible, but
Don't know about Eudora, but filters in webmailers (like gmx.de) cannot
filter on CC, nor can Lotus Notes 4.x filter reliably on CC. Those are
both
products I use regularly.
Lotus Notes I beg to differ on (and now we really are a long way from PHP
discussion ;-) ).true the auto filters
generally. no its not.. IMHO its a good thing it can help make data
validation easier, as in people can't fake variables by passing them in
the URL to the processing script.
It also helps keeps thing tidy... so providing that the processing isn't
fantastically complex (in which case the
are
in a subdirectory of the root of the site and hence fall under the
jursidiction of the .htaccess. PHP cannot however access these.. I guess
because it also needs to be authenticated...
Oh, I checked the PHP code etc... and everything works fine...
Thanks in Advance..
Tom Carter
Web Architect
roundcorners
Did you want these all to appear on the same page? If so then that can't be
done.. the nature of HTTP (the method of delivering pages to the browser)
doesn't allow for this sort of thing.. theres nothing PHP can do about that.
The only alternative I can suggest is for the page to
To be more accurate, its IIS on Windows that causes problems.. one of our
test boxes runs windows + apache and doesn't experience this problem
Tnx,
I've been trying out some stuff last night and found out some interesting
facts!
the ISAPI dll is full of access violations. Being a Delphi
this sort of works.. I did a similar thing on a site.. but it *really* is
not what HTTP is designed for + you start to get all kinds of things... main
problem being it won't execute code afterwards to then.. if, for example, it
is displayed in a table then that won't work + some browsers may not
Rather than trying to break it into an array, you can examine the rightmost
character as follows
$search=dogs;
if(substr($search,-1)=='s') $search=substr($search,0,-1);
This checks if the last character is an s and if it is then set search to
the same string but without the s.. note, does not
Hi guys,
I have an interesting situation at the moment... my (slightly sloppy) HTML
is obviously missing a closing tag here or there but displays fine in opera,
ie etc however when I try and view it netscape (4.x, windows, linux, any
platform) netscape just nice and cleanly crashes!! If anyone
You can check that the *format* of the address is valid by using regular
expressions.. look at the regular expression pages on php.net (especially
the users comments.. they do exactly that!)
As for checking whether it is a real email or not.. you can't test this
without actually sending them an
Hi all,
I have a script getfile.php which when I call like getfile.php?fileid=12 and
it returns the file to the browser with the appropiate mime headers etc..
however a problem has recently come where when I have a link to this from a
page then it prompts me to download the page I'm calling
Or if yu9o *really* want to learn reg-ex's then I can highly recommed
Mastering Regular Expressions by O'Reilly press starts from nothing
and by the end you'll find them easy as can be
HTH
- Original Message -
From: Christian Reiniger [EMAIL PROTECTED]
To: Mick Foster [EMAIL
The browser detection etc. capabilities all come from the HTTP_USER_AGENT
variable.. from this it is possible to interpret browser, platform and a
number of other things. Unfortunately screen resolution is not one of these.
PHP itself has no way of detecting anything about the client, only what
hi,
is it possible to convert a mp3 file (for example
190kbps) to a mp3 file with 128kbps or less ?
exec()
system()
To expand upon that previous answer.. sort of. PHP can't, but if you can
find a command line utility to perform the conversion (sorry, I don't know
any of hand) then PHP can
point 1...make you password fields of type password rather than text INPUT
TYPE=password rather than INPUT TYPE=text
Okay I need some people to jump in and try to use my site to see if it is
working OK. I know I have a lot of work to do on it but I just want some
feed back and to get a little
Hi Don,
How do you work this out? ie how do you know when you are spidered? I'm
interested in what logs and what patterns lead you to know this?
Thanks,
Tom
On 07-Jul-01 Mark Lo wrote:
Hi,
I don't know how to write a robot.txt file. Can anyone send me a
link or a sample
To expand on that.. printf is short for print-formatted... its a function
inherited from c (I think) which basically allows your to format variable
for the display within the function, eg if you had $x=1.2243 then you could,
for example, use ptinf to only display it as 1.22
To cut a long story
I thought convert was an imagemagick command, rather than unix by default?
could be wrong tho...
- Original Message -
From: Ben Bleything [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 08, 2001 5:23 PM
Subject: RE: [PHP] can't generate gif!!!
Also, if you don't need to do
do a lot of
photography, and so I use it a lot =
Ben
-Original Message-
From: Tom Carter [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 9:52 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can't generate gif!!!
I thought convert was an imagemagick command, rather than unix
Thanks for the offer... trouble was I took over a poorly designed project
which had to be expanded v quickly I agree entirely .. syntax is
key.. ended up restructuring the code from scratch... quicker then
trying to hack the old.
PHP will roll over and die if you leave a ';' off the
do you mean..
$message = $IP. $PORT. $SYSTEM . $PAGE;
. not ,
$message = $IP, $PORT, $SYSTEM, $PAGE;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators,
How do you mean bindings?
I've used PHP and Imagemagick.. but only from the point of view of exec
Do you mean building them into PHP functions?
- Original Message -
From: Weston Houghton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 22, 2001 11:05 PM
Subject: [PHP] PHP
on unix I think it should work for both.. can't say I know on windows..
also, why not try exec or system and just run the normal system command for
it?
- Original Message -
From: Jeff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 6:07 PM
Subject: [PHP] rename a
http://www.flashkit.com has got some fantastic examples/tutorials on passing
variables to/from flash, including to PHP and a database.. should have
everything you want there..
Take a look at tutorials on www.devshed.com .. or a few simular websites..
they sould help you..
I'm not sure about
create a file on one of your websites, say call it test.php and in it put
the following
?
phpinfo();
?
- Original Message -
From: Tom Malone [EMAIL PROTECTED]
To: PHP Users [EMAIL PROTECTED]
Sent: Tuesday, July 24, 2001 8:14 PM
Subject: [PHP] Apache/phpinfo
How can you tell if your
Do you have many DB queries? What is the average size of the result
returned?
have you tried running timing functions on it to get a measure of how long
the page is taking? theres many examples on the web..
You can also use these to calculate the time for different sections.. that
should help
I've used very
much. I am fairly sure that it isn't the last linethe exact same file
worked fine doing, say phpMyAdmin, with the only difference being that
phpMyAdmin has all its files in one directory.
I hope this email makes sense+please help!!
Eternally grateful
Tom Carter
Web Architect
Are you trying to post a form back to the same script, which will then
process it? If so then the easiest way is just
FORM METHOD=post ACTION=? echo($PHP_SELF); ?
On Fri, 4 May 2001, Chris Adams wrote:
On 4 May 2001 21:48:46 -0700, Richard Kurth [EMAIL PROTECTED] wrote:
I am having problems
that complex in mysql)
Hope this helps,
Tom Carter
Web Architect
roundcorners ltd.
On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:
Anyone know a Free database Design program? I'm needing to organize my
MySQL databases and design new databases.
regards,
Augusto
--
PHP General Mailing List
I've not heard of such a thing, and I would doubt that there is such a
thing for mysql...generally such tools are for the db2's etc.
let me know if you find anything tho, quite intruged
Tom Carter
Web Architect
roundcorners ltd.
On Sat, 5 May 2001, Augusto Cesar Castoldi wrote:
Ops
A built in function in PHP (avoids running command line stuff) that does a
reverse DNS lookup on an IP address...
$host = gethostbyaddr($REMOTE_ADDR);
(took me quite a while to find this one)
HTH,
Tom
On Sat, 5 May 2001, Kurth Bemis wrote:
At 04:11 PM 5/4/2001, Matthew Luchak wrote:
goto
The easiest way is to create a simple page (called say test.php) with the
following
?php
phpinfo();
?
This should display a page with all sorts of information about your PHP,
and serves as a good test as to whether or not PHP is working
Good luck!
Tom Carter
Web Architect
roundcorners ltd
Hi
This isn't a PHP thing, but most unix/linux distributions have a program
called wget in. You can use this to very easily download a file to your
server (eg. wget http://www.freebsd.com/man.php)
This will download the file to the server, effectively fixing it at
that so you can download it
90 matches
Mail list logo