I'm having a hard time explaining what I'm trying to do, which is why I'm
having a hard time finding anything online/in manuals...
My site serves a form for the user to fill in. User has been authenticated
with a login and we're using PHP 4 sessions. When using Internet Explorer,
the user can
I have a file with this:
ullia href=http:\\www.someaddress.comSomeSite/a This is a
description of the site./ul
I'm trying to parse out the address, site name, and description into
separate variables. How can I do this?
Thanks,
-Ed
On Tue, 30 Apr 2002, Warrick Wilson wrote:
I'm having a hard time explaining what I'm trying to do, which is why I'm
having a hard time finding anything online/in manuals...
My site serves a form for the user to fill in. User has been authenticated
with a login and we're using PHP 4
Hi!
I have a problem with passing variables to php script with simple GET.
example:
--- hello.html -
htmlheadtitle=hello/head
body
a href=hello.php?arg=worldhello/a
/body
/html
--- hello.php --
?
printf(arg=$argbr);
?
output from
Generate a random number when creating a form, store it in the session and
in a hidden on the form. Then when the post comes back, make sure the hidden
is there and that it matches the one in the session.
Cal
*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*
Make sure enable track vars is enabled.
Try specifying
global $arg
before you access it.
Try using phpinfo(); in your script. That will display all available
variables.
-Original Message-
From: efa [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 1:04 PM
To: [EMAIL
On Tue, 30 Apr 2002, Lazor, Ed wrote:
ullia href=http:\\www.someaddress.comSomeSite/a This is a
description of the site./ul
I'm trying to parse out the address, site name, and description into
separate variables. How can I do this?
I assume you mean http:// and not http:\\.
$str =
Buon giorno, Emiliano,
Do you have root access to the system? If so, try downloading the gcc
package from http://www.sunfreeware.com/. Installing it in package
format should make everything work for you. Also make sure that your
LD_LIBRARY_PATH contains the correct locations (such as
On Tue, 30 Apr 2002, Cal Evans wrote:
Generate a random number when creating a form, store it in the session and
in a hidden on the form. Then when the post comes back, make sure the hidden
is there and that it matches the one in the session.
That doesn't help, that I can tell - when the form
On Wednesday 01 May 2002 04:05, Cal Evans wrote:
Generate a random number when creating a form, store it in the session and
in a hidden on the form. Then when the post comes back, make sure the
hidden is there and that it matches the one in the session.
But the flaw in that is if the nasty
thx that worked, the problem is that I am installing XMB which is
php/mysql based message board, and they are useing syntax similar to mine
( without $_GET).
Is there a workaround for it, without having to edit their code?
I'll try to recompile the PHP with trackvars enabled as suggested by
This random number, because it is being sent to the user is just as easy to
forge as the rest of the fields on the form. The only thing you can do is check
the refferer on the submitted page, but alas even this can be forged with enough
technohow. Good luck!
James
-Original Message-
I'd recommend writing a wrapper around base_convert, naming it hex2bin
and using that instead. base_convert() is way too expensive for this
purpose (you know that any hex figure is translated to exactly four
bits, so you don't need any actual conversion - just replacement). This
is why I
Check out your php.ini file and look for some lines that read something
along the lines of
zend_extension=/path/to/ZendOptimizer.so
zend_optimizer.optimization_level=15
Then either:
a. Get rid of those lines; or
b. Get the Zend Optimizer and put it some place where PHP can see it can
modify
Expensive how?
-josh
Bogdan Stancescu [EMAIL PROTECTED] wrote:
I'd recommend writing a wrapper around base_convert, naming it hex2bin
and using that instead. base_convert() is way too expensive for this
purpose (you know that any hex figure is translated to exactly four
bits, so you don't
I have been successfully using Sablotron with PHP for the last year and
half.
Recently I have started investigating Libxslt(running on my windows machine
I get
much better performance with it as compared to sablotron.)
I am trying to find any information about installing Libxslt on Linux
running
I have a server where I'm running some third party apps.
until now I've had register globals 'on', now I have a new app that
requires register globals 'off' for it to work, if I change the php.ini
to off then it breaks some of the other applications.
Is there a way to turn register globals on
Chapter 3 in the PHP manual covers setting PHP configuration directives via
the .htaccess file.
I use this to enable register globals where needed so that I can keep it off
for the scripts that do not depend on them.
Jason
-Original Message-
From: Jeff Bearer [mailto:[EMAIL PROTECTED]]
Thanks after playing about with that I've got the following which does seem
to work !
$imode_code[$i] = eregi_replace((src=)(\)([a-z0-9_\/-]+\.gif)(\),
\\1\\2$path/\\3\\2, $imode_code[$i]);
Very very very slowly getting the hang of regexs !
What does your /i do at the end ???
Thanks
Try
On Wed, 1 May 2002, John Fishworld wrote:
Thanks after playing about with that I've got the following which does seem
to work !
$imode_code[$i] = eregi_replace((src=)(\)([a-z0-9_\/-]+\.gif)(\),
\\1\\2$path/\\3\\2, $imode_code[$i]);
Very very very slowly getting the hang of regexs !
In article [EMAIL PROTECTED],
[EMAIL PROTECTED] (Jason Sheets) wrote:
From: Jeff Bearer [mailto:[EMAIL PROTECTED]]
Is there a way to turn register globals on or off in the script at
runtime?
Chapter 3 in the PHP manual covers setting PHP configuration directives via
the .htaccess
aha !
thats very strange then because mine works at the moment but if I add the /i
at the end then it doesn't !
On Wed, 1 May 2002, John Fishworld wrote:
Thanks after playing about with that I've got the following which does
seem
to work !
$imode_code[$i] =
Use .htaccess, setting register_globals at runtime
will not have the desired affect.
Btw, I can't think of a reason why a script designed
with register_globals = off would not work with it
on. Which is why assuming register_globals = off will
make your scripts more portable.
See also:
When I run this the first time, file.txt contains value of 30. Then I add 15
to it with following script and file now contains value of 45. I look at
file.txt after write and it does indeed contain number 45. But when I run
script 24 hours later via cron job, it still thinks file.txt is holding
Hey,
This time it's not about missing quotes or parenthasies i hope.
I'm trying to make a form which sends name, email, website, favsong and
comments to table guestbook, but when the checkbox mailinglist is checked it
should send the name and email to table mailinglist, but it doesn;t seem to
Hi,
Is it possible to detect if a file is being called as an include or require?
ex:
include(file.php)-- file.php code can detect that is has been
called as an include.
Thanks,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Try this code (untested):
function selfAwareInclude($filename)
{
define($filename, true);
include($filename);
}
Inside your include file, make calls such as
if (defined($filename)) {
// Do whatever
}
Then use the selfAwareInclude() function instead of include(). You could
do the
The problem with this is you will loose the scope of your variables.
So $filename will not have access to anything from where the function is
called...
-mark
On Tue, 30 Apr 2002, Billy S Halsey wrote:
Try this code (untested):
function selfAwareInclude($filename)
{
I wasn't paying that much attention. The /i is a preg thing. It's the same
as changing from ereg to eregi.
miguel
On Wed, 1 May 2002, John Fishworld wrote:
aha !
thats very strange then because mine works at the moment but if I add the /i
at the end then it doesn't !
On Wed, 1 May 2002,
On Tue, 30 Apr 2002, PHP List wrote:
Is it possible to detect if a file is being called as an include or require?
ex:
include(file.php)-- file.php code can detect that is has been
called as an include.
Compare $PHP_SELF with __FILE__, maybe?
miguel
--
PHP General Mailing List
In addition to everything else discussed:
1. make sure the referring page (ie, the form) was as expected (ie, an
address you trust). This may block a small % or users who's browser doesn't
set a referrer string.
2. ensure that all values were submitted via $_POST, which will prevent the
user
// In your config file:
function selfAwareInclude($filename) {
define($filename, true);
}
// in the file you are making an include
selfAwareInclude($filename)
include($filename);
Sincerely,
Maxim Maletsky
Founder, Chief Developer
www.PHPBeginner.com // where PHP Begins
I've got PHP 4.2 and what I believe to be the newest version of the GD
library up and running.. For some reason, my PNG images do not preserve
their transparencies but rather have a white background. I do not have this
problem on my production server, so this has something to do with my local
Check Out Zend Studio. www.zend.com This was created by the folks who
created php.
Jason
Liam Gibbs [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Does anybody know of any PHP project editors,
something that will group together all the PHP, INC,
HTML, CSS
Hello friends,
1. Can u guys provide any links on php script master details forms?
2. data grids?
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Sure you got your permissions set right?
On Tuesday 30 April 2002 16:29 pm, you wrote:
When I run this the first time, file.txt contains value of 30. Then I add
15 to it with following script and file now contains value of 45. I look at
file.txt after write and it does indeed contain number
Perhaps you could use something a little more KISS- like
rawurldecode(chunk_split ( $hexstring, 2 , %))
not sure if it would be faster than base_convert or not, but it
wouldn't be too hard to find out.
On Tuesday 30 April 2002 11:50 am, you wrote:
Although the first comment was not what I
1. Can u guys provide any links on php script master details forms?
http://www.google.com/search?sourceid=navclientquerytime=Bq=php+script
+master+details+forms
2. data grids?
http://www.google.com/search?sourceid=navclientquerytime=-ZMXjBq=data+
grids
---John Holmes...
--
PHP General
There are some classes that use sockets to send mail by connecting
directly to an SMTP server. Look on hotscripts.com or phpclasses.com
(.org?)
---John Holmes...
-Original Message-
From: John Hughes [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 10:01 AM
To: [EMAIL
Why would the following function not return a value: (both $lastname and
$firstname are defined)
function get_handle($lastname, $firstname)
{
$handle_guess=$lastname;
$handle=array();
$fp=fopen('../truelies/userdb', r);
while ($d=fgetcsv($fp, 250, ;)) {
$handle[] = $d[0];
Why do you even bother? Just name your file SFISFWEF.html and have that
as your password. If security isn't important, then don't use it at all.
And please don't program anything for anyone else.
---John Holmes...
-Original Message-
From: Rodrigo [mailto:[EMAIL PROTECTED]]
Sent:
Computation time. CPU cycles.
On Tuesday 30 April 2002 13:56 pm, you wrote:
Expensive how?
-josh
Bogdan Stancescu [EMAIL PROTECTED] wrote:
I'd recommend writing a wrapper around base_convert, naming it hex2bin
and using that instead. base_convert() is way too expensive for this
http://www.php.net/manual/en/language.variables.scope.php
On Tuesday 30 April 2002 19:09 pm, you wrote:
Why would the following function not return a value: (both $lastname and
$firstname are defined)
function get_handle($lastname, $firstname)
{
$handle_guess=$lastname;
Computing-intensive, time-consuming and whatever else expensive
functions do ;-)
Bogdan
Joshua E Minnie wrote:
Expensive how?
-josh
Bogdan Stancescu [EMAIL PROTECTED] wrote:
I'd recommend writing a wrapper around base_convert, naming it hex2bin
and using that instead. base_convert() is way
This one will actually remove money from your bank account if you pass
the constant PHP_TAKE_MY_MONEY as the 10th argument.
---John Holmes...
-Original Message-
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 8:06 PM
Cc: [EMAIL PROTECTED]
Subject:
Try filling up pass.txt with the same password over and over and use a
regular login.txt. Then try it with a username from somewhere in the
middle of the files. I think your problem has something to do with array
indexes - if what I suggested works, you can then work your way through
it by
Addressed to: Philip Olson [EMAIL PROTECTED]
[EMAIL PROTECTED]
** Reply to note from Philip Olson [EMAIL PROTECTED] Tue, 30 Apr 2002 22:45:49
+ (GMT)
Btw, I can't think of a reason why a script designed
with register_globals = off would not work with it
on. Which is why
On Wednesday 01 May 2002 07:34, Jule wrote:
Hey,
This time it's not about missing quotes or parenthasies i hope.
I'm trying to make a form which sends name, email, website, favsong and
comments to table guestbook, but when the checkbox mailinglist is checked
it should send the name and email
Two things,
if you gonna use files for such things it might help to follow such
format inside the file
[use]=somebody
[password]=theirpass
it might be easier if you have the file named after the user and it sould
store the pass
eg. somebody.txt
then have php check for the file with
I don't know, every time i submit the form w/ the checkbox checked. it gives
me the echo string which comes when the if is not executed..it adds the
entries from the form to the guestbook table, but doesn't add the name and
email to the mailinglist table. it doesn't give me any php or mysql
So it executed the first if:
if (mysql_db_query ($DBName, $Query, $Link)) {
echo Your entry will be addedbrClick
a
href=../index.php?left=guestbookrighttop=guestbookrightbottom=guestbookrttitle=mailinglistrbtitle=gbaddhere/a
to go back.;
}
Hello,
Fred wrote:
Hello,
I have a pb with mail() function.
my script run ok on a linux but not on a nt:
?
ini_set(SMTP, 192.168.0.126);
ini_set(sendmail_from, info [EMAIL PROTECTED]);
mail(fred [EMAIL PROTECTED], the subject, message);
?
On my windows nt server I can only run:
?
Hello,
John Hughes wrote:
For the second time in less than a week, the commercial Web service
provider where I have four domains hosted has managed to break PHP.
In particular, I get this message:
Warning: mail() is not supported in this PHP build
I'm not interested in what causes the
On Wednesday 01 May 2002 11:48, Jule wrote:
but not the second one:
if (isset($Guestbook[mailinglist])) {
You should be using:
if (isset($Guestbook['mailinglist'])) {
if (mysql_db_query ($DBName, $Query2, $Link)) {
echo Your
Alright i'll take care of that, thanks a lot!
Jule
On Wednesday 01 May 2002 00:26, you wrote:
On Wednesday 01 May 2002 11:48, Jule wrote:
but not the second one:
if (isset($Guestbook[mailinglist])) {
You should be using:
if (isset($Guestbook['mailinglist'])) {
Hello all,
I have an app that I wrote some time ago using Delphi and Kylix that retrieves e-mails
from an account and save only .txt, .csv and .zip attachments to a directory and
depending on the files it does some database processing such as updating records that
are lated browsed with php
101 - 156 of 156 matches
Mail list logo