[PHP] show_source

2003-10-28 Thread nathan --
Is there a way to stop the function show_source() from putting extra code at 
the begginning and end of the code it grabs?
Beginning: 
Middle: 
End: 

I am doing a str_replace to get rid of it, but it would be nice to be able 
to pass a parameter to the funtion to stop it from adding the extra code.

Thanks for your time.
Nathan Maki
_
See when your friends are online with MSN Messenger 6.0. Download it now 
FREE! http://msnmessenger-download.com

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


Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Nathan

I'll second that one... always better to code with register_globals = Off and E_ALL 
reporting level
IMHO.

# Nathan

- Original Message -
From: "Philip Olson" <[EMAIL PROTECTED]>
To: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>

> To stop receiving the messages from undefined variables add this at top
> of your files:
>
> error_reporting(55);

Or better yet, keep as you're doing and develop with E_ALL
and fix those E_NOTICE errors correctly! ;)

Regards,
Philip Olson


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




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




Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Nathan

I would agree that performance-wise, there may be little difference in how fast a 
script runs. And
for pre-defining variables, sure you can get away without doing that and php will 
happily help you
out. However, I find it easier to debug my code knowing whether or not I remembered to 
assign a
value to my variable and where the heck it got assigned from. :-)

I would also like to point out that the combo of not registering globals and having 
all errors
reported will ensure you get the right data type when using the same variable names 
for _POST,
_SESSION, et cetera data. I had a few scripts that behaved differently than I though 
because I was
looking for the value of $foo and not realizing that my $foo was grabbing my session 
data instead of
what I thought I was assigning it to. I changed my php.ini and now I tear out far less 
hair this way
;-)

# Nathan


- Original Message -
From: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>
To: "'Nathan'" <[EMAIL PROTECTED]>; "'PHP'" <[EMAIL PROTECTED]>
Sent: Thursday, April 25, 2002 12:18 PM
Subject: RE: [PHP] Parse Error - Help? (AGAIN)


You know, I once said the same: better fix the notices and keep the code
"clean". But as I've done several performance tests I came to a
conclusion that there's no much difference debugging the code yourself
or let PHP doing it. Often predefining manually a variable resulted to
me being even more 'expensive' then when PHP debugs it. I think it is
wise using this feature of PHP. The only reason not to is for having the
full control of your code.

Just my 2 Eurocents

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins



> -Original Message-
> From: Nathan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 7:15 PM
> To: PHP
> Subject: Re: [PHP] Parse Error - Help? (AGAIN)
>
> I'll second that one... always better to code with register_globals =
Off and E_ALL
> reporting level
> IMHO.
>
> # Nathan



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




Re: [PHP] Parse Error - Help? (AGAIN)

2002-04-25 Thread Nathan

Fair enough, I suppose at that point it is simply a matter of preference, though I 
must maintain my
debug commentary... I really like knowing that the reason my $variable isn't 
displaying anything is
because I speeled it $varaible. :-)

Cheers,

# Nathan


- Original Message -
From: "Maxim Maletsky (PHPBeginner.com)" <[EMAIL PROTECTED]>
To: "'Nathan'" <[EMAIL PROTECTED]>; "'PHP'" <[EMAIL PROTECTED]>
Sent: Thursday, April 25, 2002 12:58 PM
Subject: RE: [PHP] Parse Error - Help? (AGAIN)


> I would agree that performance-wise, there may be little difference in
how fast a
> script runs. And
> for pre-defining variables, sure you can get away without doing that
and php will
> happily help you
> out. However, I find it easier to debug my code knowing whether or not
I
> remembered to assign a
> value to my variable and where the heck it got assigned from. :-)


This is true. Whatever I write I always have variable *I* created, all
the rest are $_*[] and good old $HTTP_*_VARS[]. I always had register
globals off. So, in this way, since I know that every variable is mine,
why do I have to leave error_reporting E_ALL?


> I would also like to point out that the combo of not registering
globals and having all
> errors
> reported will ensure you get the right data type when using the same
variable names
> for _POST,
> _SESSION, et cetera data. I had a few scripts that behaved differently
than I though
> because I was
> looking for the value of $foo and not realizing that my $foo was
grabbing my session
> data instead of
> what I thought I was assigning it to. I changed my php.ini and now I
tear out far less
> hair this way
> ;-)


Once again, use $_SEESION and this is resolved.
Good point about variable types. Setting them before solves this
problem.

Sincerely,

Maxim Maletsky
Founder, Chief Developer

www.PHPBeginner.com   // where PHP Begins


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




Re: [PHP] Array function to delete

2002-04-25 Thread Nathan

No. :-)

What I've had to do is add a dummy value, unset($array[4]) and then array_pop the 
dummy value off
the array to get it out of there completely. The reason: unset will only remove 
$array[4]'s value,
not the key.

There are plenty of other ways I'm sure, but simply unsetting has really messed me up 
on occasion.
I'll unset a value and then implode my array (say a list of numbers), and end up with 
a string like
so:

1,233,642,,234,5632,

Where I've unset the 4th and last keys. Which of course really messes up and explode.

# Nathan

- Original Message -
From: "Liam Gibbs" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 25, 2002 1:22 PM
Subject: [PHP] Array function to delete


I've been checking the PHP documentation, but can't
find a function that will delete a member of an array,
like such:

$a = array(1, 2, 3, 4, 5);

Use the function, say array_delete($a, 3); and that
will delete the third member in the array (which would
be 4 above), so that the array would contain 1, 2, 3,
5.

Is there such a function?

__
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

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




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




Re: [PHP] Array function to delete

2002-04-25 Thread Nathan

Apparently in 4.1.X this is true... I'd been running 4.0.6 for a long time (until 
4.1.2 was
released), and must have coded it in the earlier version. I stand corrected! :-)

A simple test to see if your version supports this:

$value) {
echo $key." = ".$value."";
}
?>

If you're running an older version, it should output:
0 = zero
1 =
2 = two
3 = three

Versions 4.1.X+ should completely remove key 1.

Cheers,

# Nathan

- Original Message -
From: "Lars Torben Wilson" <[EMAIL PROTECTED]>
To: "Nathan" <[EMAIL PROTECTED]>
Cc: "Liam Gibbs" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 1:46 PM
Subject: Re: [PHP] Array function to delete


On Thu, 2002-04-25 at 12:34, Nathan wrote:
> No. :-)
>
> What I've had to do is add a dummy value, unset($array[4]) and then array_pop the 
>dummy value off
> the array to get it out of there completely. The reason: unset will only remove 
>$array[4]'s value,
> not the key.
>
> There are plenty of other ways I'm sure, but simply unsetting has really messed me 
>up on occasion.
> I'll unset a value and then implode my array (say a list of numbers), and end up 
>with a string
like
> so:
>
> 1,233,642,,234,5632,
>
> Where I've unset the 4th and last keys. Which of course really messes up an explode.
>
> # Nathan

You need to upgrade. :) The above hasn't been true for a while...at
least since 4.1.2 and perhaps earlier.



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




Re: [PHP] Variables not working

2002-04-26 Thread Nathan

Before you get carried away with registering globals, try echoing:
$_SERVER["HTTP_USER_AGENT"];

Or, for versions prior to 4.1.X, change that to:
$HTTP_SERVER_VARS["HTTP_USER_AGENT"];

Registering globals is insecure unless you are VERY careful about how every variable 
you have is
defined...

Cheers,

# Nathan

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "baldey_uk" <>
Cc: <>
Sent: Friday, April 26, 2002 6:41 PM
Subject: Re: [PHP] Variables not working


Turn on register_globals in your php.ini file.

On Sat, 27 Apr 2002, baldey_uk wrote:

> Hello all, im not sure if its my installation or if on doing something wrong
> but i cant seem to use any of the variables from forms that i PUT to. Or any
> full stop! even
>
> 
>
> doesnt out put anything. Anyone seen this before?
> thanks in advance for your help
>
>
> Cheers From
>
> baldey_uk
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




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




Re: [PHP] Supplied argument is not a valid MySQL result resource

2002-04-28 Thread Nathan

I am betting the problem is simply your semicolon... never use a semicolon in a php 
mysql query. It
doesn't need one. In general, though, you should write your query such that it will 
tell you exactly
what went wrong... Re-write this like so:

$sql = 'select * from aannh_towns';
$result = mysql_query($sql) or exit("Query failed. Error: ".mysql_error()."".$sql);

This will spit out the mysql error as well as the query as mysql tried to execute it. 
You could even
make this a function if you like... then all you'd have to do is pass the query into 
it and it'll
spit out the result resource. Something like:

function sql_query($sql) {
$result = mysql_query($sql) or exit("Query failed. Error: 
".mysql_error()."".$sql);
return $result;
}

This will save you a lot of time searching for what broke! :-)

Cheers,

# Nathan

- Original Message -
From: "Dan McCullough" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 28, 2002 4:14 PM
Subject: [PHP] Supplied argument is not a valid MySQL result resource


What does that error mean?

$result = mysql_query('select * from aannh_towns;');
echo 'info stored';
while ($query_data = mysql_fetch_array($result)) {
 echo "", $query_data['town'], "", $query_data['town_id'], ""; }
?>

=
dan mccullough

"Theres no such thing as a problem unless the servers are on fire!"


__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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




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




[PHP] An array of objects?

2002-05-13 Thread Nathan

I have some data I need to store in the session array and I'm not exactly sure how to 
get it there
and get it back... I have a list of room ID numbers, and each room ID has a few 
attributes I need to
keep track of. I end up with a listing like so:

room_id = 1, room_name = "Bob's Room", room_status = 1
room_id = 2, room_name = "Jeff's Room", room_status = 0

Room_id is unique, room_name is a string, and room_status is boolean. There are on 
average 30 rooms
that need to be kept track of. I'd like to put all this data in the session array so I 
don't have to
query my database every time the page reloads, which will happen fairly often. If the 
data is in the
session, then I can simply update the room_status where I need to without fetching 
everything again.

Anyway, I am having a really hard time figuring out how to keep track of all this 
data, and I've
looked at it so long I'm sure I'm making far more complex that necessary.

I've attempted to create an array of objects but I get warnings whenever I try to 
refer to
$myObject[$1]->status or anything like that. I've also tried a 4D array, but I am 
doing something
very wrong trying to reference the data... Anyone got ideas here?

Many thanks!

# Nathan


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




[PHP] output_compression refuses to work

2002-05-14 Thread Nathan

I've done some research on this and I'm a bit baffled as to why I can't get 
zlib.output_compression
to work. I have two machines I've tried this on, and neither one wants to compress 
anything. The
machines are RH 7.1 and 7.2, both running Apache 1.3.24 and PHP 4.2.0, though I 
couldn't get it
working with earlier versions of both apps either.

The error_log for Apache is telling me:
  PHP Fatal error:  Cannot use both zlib.output_compression and
  output_handler together!! in Unknown on line 0

The pertinent areas of php.ini read like so:
  output_buffering = Off
  output_handler = ob_gzhandler
  zlib.output_compression = On


Also, if I leave all this stuff off, and I try to call it from a script:



I look in the zlib area of phpinfo and zlib.output_compression is off both locally and 
globally.
However this generates no errors that I can find, though I could be looking in the 
wrong place :-)

My compile options are simple, just:
  --with-mysql
  --with-apache=../apache_1.3.24
  --with-pdflib=no
  --with-zlib

Zlib is version 1.1.3 according to phpinfo. My web browser, if it matters, is I.E. 6.0 
running on 2K
with SR2. Everything else seems to be running fine on this machine; I even got Zend 
Optimizer
working for once! Any ideas?

Thanks!

# Nathan


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




Re: [PHP] passing arrays

2002-05-23 Thread Nathan

Da. It will create a 3D array, so you would reference the data via:

echo $_GET["myarray"][0];
// returns "one";
echo $_GET["myarray"][1];
// returns "two";
...

Or, if you put this in a form, use _POST instead of _GET.

- Original Message - 
From: "wm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 1:49 PM
Subject: [PHP] passing arrays


hi,

is there a way to pass arrays in forms or in the url?

if i have $myarray=array("one","two","three");

can i pass the whole array at once as opposed to having to pass each
individual element?

thanks.


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




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




Re: [PHP] passing arrays

2002-05-23 Thread Nathan

Sorry, I have my brain set on sessions today... The serialize idea presented suggested 
by Miguel is
a good way to do it.


- Original Message -
From: "Nathan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 1:56 PM
Subject: Re: [PHP] passing arrays


Da. It will create a 3D array, so you would reference the data via:

echo $_GET["myarray"][0];
// returns "one";
echo $_GET["myarray"][1];
// returns "two";
...

Or, if you put this in a form, use _POST instead of _GET.

- Original Message -
From: "wm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 1:49 PM
Subject: [PHP] passing arrays


hi,

is there a way to pass arrays in forms or in the url?

if i have $myarray=array("one","two","three");

can i pass the whole array at once as opposed to having to pass each
individual element?

thanks.


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




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




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




Re: [PHP] mysql_select_db problem

2002-06-02 Thread Nathan

Do some error checking. You're turning off all the errors produced by the mysql 
statements, so how
are you supposed to know what's wrong?

You could also try:

$db = mysql_select_db($db_name) or exit(mysql_error());

I'm not sure if mysql_error works for selecting the db, but it couldn't hurt to try :-)

Cheers,

# Nathan

- Original Message -
From: "PossumPal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 02, 2002 12:40 PM
Subject: [PHP] mysql_select_db problem


Hi,

I'm a newbie, so please have mercy on my silliness...

I've checked my formats, and can't seem to understand why I can connect to the db, but 
not select
the db that I want to use.  The following code always returns the "Couldn't select 
database" error.

If I use the mysql monitor, I can select the database directly without any problems.

Could someone point out what I'm missing?



Regards,

Carol






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




[PHP] $REMOTE_ADDR subnet consistency?

2001-06-30 Thread Nathan








Hi PHP heads,

    I have
question regarding $REMOTE_ADDRes consistency. I am
developing a custom session library and I need a way to
uniquely identify each http client. Hasn’t
this has been a never-ending struggle for web developers? Anyways, I’m using the variables $HTTP_USER_AGENT and
$HTTP_ACCEPT_ENCODING to help create the session hash and am now considering
putting $REMOTE_ADDR into the pot. I know that there are problems with
$REMOTE_ADDR, like proxies and NATs, BUT I WAS
WONDERING, and now here comes my question, do the first two subnets of an IP
address (i.e. 204.57.x.x) typically stay the same, so that they could be relied
upon for general authenticity? By grepping through
the access logs this appears to be true. Ok and don’t tell me, “Why don’t you just use
cookies?” Because we must support non-cookie clients and cookies are not
as authentic as IP addresses. Thank you for your brilliant insights to this
question.

 

Nathan Cassano

ContractJobHunter

Web Developer

 

 








[PHP] How do I get PHP's User-Agent?

2001-07-11 Thread Nathan

I need to create an authentication hash based on the user agent, to
connect to a server but I need PHP’s User Agent, which is usually
something like PHP/4.0.X. Is there a variable or way to get this? Thank
you.



RE: [PHP] PHP vs Perl question

2001-07-18 Thread Nathan

I personally try and avoid using Perl when I can. Perl is difficult to
learn to write proficient code in. Perl's moto is, "There is More Than
One Way to Do It" which also mean there are more than a million ways to
mess up. Depending upon the programmer Perl can be a write-only
language. You can even look at your own Perl code and think "What in the
world, did I write this?" My mind is cluttered with enough garbage so I
will not learn anymore  Perl than necessary. Long live modern languages!

Perl is a necessary evil for a web developer, so I recommend O'Reilly's
Learning Perl, http://www.oreilly.com/catalog/lperl3/

-Original Message-
From: Tom Malone [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 18, 2001 3:03 PM
To: PHP Users
Subject: [PHP] PHP vs Perl question

I'm pretty new to programming - besides JavaScript, PHP is really the
first
language I've used.
I'm just wondering, and I'm sure you all would know - should I learn
Perl?
Is it considered a necessity for a web developer to know Perl, or is it
not
a worthwhile endeavor, considering how easy PHP is to learn and use?
Someone
I know told me not to bother, but I just wanted a second opinion.
(BTW - if you think it is worthwhile to learn Perl, what is a good book
to
begin with?)

Thank you!
Tom Malone


-- 
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, e-mail: [EMAIL PROTECTED]




[PHP] PHP2Perl converter?

2001-08-24 Thread Nathan

Hi, I just had a random thought as I was working on some php and perl
code today and I ask, has anyone out there created a PHP to Perl
converter? Similar to the ASP to PHP converter. I think only God could
make a Perl2PHP converter.


-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] Modem communcation using PHP

2001-09-24 Thread Nathan

Try this..


-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]] 
Sent: Monday, September 24, 2001 9:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Modem communcation using PHP


Hi ya all!

I can't find the PHP documentation on using the php code to
initalize,
configure, dail, send and receive data using the modem.   Anyone know
anything about it.  I'm kind of stuck on this project.  Will appreciate
it on anyone who can point it out for me.

Thanks,
 Scott



-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] fopen

2001-10-01 Thread Nathan


Short answer. http://www.php.net/manual/en/function.flock.php

-Original Message-
From: Kmarada [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, October 02, 2001 11:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] fopen


is it possible to use fopen to open 5000 files differents simultaneous
and edit it simultaneous ?

I have one file. if four user edit it simultaneous what happen? there is
something to lock the file until one finish to edit? I read at manual
something like flock how can i use it?


-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] crypt and decrypt a string

2001-10-05 Thread Nathan

Here are some simple xor encoding functions that I wrote. This will keep
the average joe from peaking at your data.

function decode($data){
$data = base64_decode($data);
/* XOR data */
for($i = 0; $i < strlen($data); $i++){
$data[$i] = ~ $data[$i];
}
return $data;
}

function encode($data){
/* XOR data */
for($i = 0; $i < strlen($data); $i++){
$data[$i] = ~ $data[$i];
}
$data = base64_encode($data);
return $data;
}

-Original Message-
From: Joel Ricker [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 05, 2001 7:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] crypt and decrypt a string


Does anybody have an easy way to crypt and decrypt a string?  I see the
Mcrypt Encryption module but thats a little more gung-ho than I'm
looking for.  I'm not trying to encrypt sensitive data rather I'm more
trying obfuscate it a variable for a hidden tag.

Thought I remember seeing something using XOR?  Any ideas?

Thanks
Joel


-- 
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, e-mail: [EMAIL PROTECTED]




[PHP] Problems with PHP after MySQL Upgrade

2005-09-19 Thread Nathan
Here's the issue. I use MySQL as my database backend. I used to have php
running
fine and I used phpMyAdmin to do any admin functions I needed to on MySQL.

I recently upgraded to MySQL 5.x and ever since I've gotten the following
error messages.

When I try to use extension=php_mysqli.dll

This error follows

The procedure entry point myslq_stmt_bind_param could not be located in the
dynamic link library LIBMYSQL.DLL

Then I the following warning:

PHP Startup: Unable to load dynamic library 'c:\Program Files\Apache
Group\Apache2\PHP\ext\php_mysqli.dll' - The specified procedure could not be
found.

When I try to use php_mysql.dll I get the following errors.

The procedure entry point mysql_thread_end could not be located in the
dynamic link library LIBMYSQL.DLL

PHP Startup: Unable to load dynamic library 'c:\Program Files\Apache
Group\Apache2\PHP\ext\php_mysql.dll' - The specified procedure could not be
found.


I've uninstalled and reinstalled Apache, PHP, and MyPHPAdmin - and I still
get no love.

Like I said, worked great before I upgraded to MySQL 5.x

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



[PHP] Re: Using strtotime on 'old' dates.

2003-01-10 Thread Nathan Fritz
We're running into the same problem. It was quite convenient to use
date("Y-m-d",strtotime($dateField)) to process date data for MySQL. Worked
fine for my news management system, since I work with current dates, but my
colleague is using it for an application submission system, and needs
birthdates and such from before 1970.

Are there other functions that can do the same kind of textual date
conversions?



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




[PHP] New way to make select boxes auto select

2002-07-25 Thread Nathan Cook

You may already be doing it like this, but I think I found a new way to
make select boxes auto-select (what data they put in) a lot easier. All you
have to do is put a variable in each select tag that is equal to the value
of the select option i.e.:  -- then all you
have to do is base the variable on that  $$interest =
"selected"; quick and easy with out having to loop through an if elseif
statement.  Let me know if you like that method or have any objections.

Full example below.

print("\n");
// creates a variable with a name based on
// the value of interest with a value of "selected"
$$interest = "selected";
print("- Select One -\n");
print("Teacher\n");
print("Lego Enthusiast\n");
print("Student\n");
print("Homeschool Parent\n");
print("Browsing\n");
print("Afterschool\n");
print("Boys & Girls Club\n");
print("YMCA\n");
print("  \n");

[ Nathan Cook | [EMAIL PROTECTED] ]



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




Re: [PHP] New way to make select boxes auto select

2002-07-25 Thread Nathan Cook

> // buildSelect -- return a Select box named $selectName based on key
value array $selectArray
> ...
> // $arr = array('MD'=>'selected','DC'=>'','VA'=>'');

How are you able to quickly and painlessly determine which key gets the
selected value, from form submission data, when building the initial array?


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




Re: [PHP] New way to make select boxes auto select

2002-07-25 Thread Nathan Cook

From: "Johnson, Kirk" <[EMAIL PROTECTED]>
> Do you know what happens here if the error reporting is set to max?
> Are a bunch of "unitialized variables" warnings issued?

That would be my assumption.  I suppose you could initialize the variables
first to circumvent that. I was more or less looking for a quick and dirty
way to accomplish the task.

However, it looks like some good functions have been submitted to the list
which would solve the error reporting.  Something along the lines of
building an array and then calling a function to loop through the array
pieces and build a select menu.

In my case, I wasn't looking to create another function, just a quick
statement.


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




Re: [PHP] Re: New way to make select boxes auto select

2002-07-26 Thread Nathan Cook

> From: "lallous" <[EMAIL PROTECTED]>
> I use javascript for that! :)

I try to steer away from javascript as much as possible (and anything else
client-side), unless I know my audience extremely well and they are locked
into a certain browser and version, i.e. internal applications.  But I like
that method very much!

 [ Nathan Cook | [EMAIL PROTECTED] ]




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




[PHP] text area with quotes

2002-07-31 Thread Nathan Kline

this seems so obvious yet it is giving me problems.

I have a text area in a form that is passed to a php page to be 
written to a database. first though It displays the contents of the 
form in a preview page. then if everything is good the user click the 
button and it write to the DB. I pass the contents of the text area 
straight to the next page (i.e. $form_item_name) so i never mess with 
the variable.

now for the problem.

when it displays the variable it adds the escape character (\) to any 
' or " in the text. if I resend the same document it adds more. how 
do i get it to display 's and "s in a variable without php adding the 
\??


-- 
Nathan Kline
i.e. Man in the Box
[EMAIL PROTECTED]

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




Fw: [PHP] I need some help: PHP portal site/creating email accounts through form submission

2002-07-31 Thread Nathan Cook

> So my specific problem is this: How do I create a new
> user account on a *NIX system to have permissions to
> send and receive email, for a web based email system.

In theory, and in my case, I couldn't have PHP do this because PHP is
running on apache with the user status of nobody.  So here is my
long-winded solution:

User requests e-mail account to be created.  PHP inserts their name into a
text file (or db, doesn't matter).  I compiled command line php
(./configure without the --with-apache).  I setup command line php to run a
php script through cron with root permissions every 5 mins.  The php script
moves the text file to a temporary location (so that I don't have people
added to it as I am reading it) and then the php script parses through the
usernames and passwords in the text file and issues system() commands to
create the users.  It is not the most secure solution but there are some
ways to secure it through data validation.

Does that make sense?

Hope so,
Nathan Cook


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




[PHP] Fork and multi-thread in PHP?

2002-06-12 Thread Nathan Cassano


Hi PHP folks,
I have a program that sends out email by making socket
connection to our email server. The problem is that the program is very
slow because it has to finish talking to the email server until it can
proceed with the next email (as opposed to the mail() function that just
forks off a sendmail process). Is there a way for PHP to fork or
multi-thread to do I/O?


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




[PHP] Confusion with the $_name $_type $_size Variable Extensions

2002-06-14 Thread Nathan Taylor

I am having a lot of trouble with the $_name, $_size, and $_type
variable extensions.  I have a basic file upload system however it is
within a function.  Sometimes when I declare the aforementioned
variables in a global statement such as global $file_name I can get a
value for _name, other times, I get nothing.  Can someone clarify
this because I was unable to find anything in the manual?

Cheers,

Lakario
ModDev.netGet more from the Web.  FREE MSN Explorer download : http://explorer.msn.com



Re: [PHP] Confusion with the $_name $_type $_size Variable Extensions

2002-06-15 Thread Nathan Taylor

I know it has nothing to do with filesize because I am the server and I set the 
configuration.  But lemme show you some code, maybe that'll help.  Here we go:  

(please no ripping)
function MyFiles() {
global $username, $Upload, $Rename, $Delete, $PHP_SELF, $File, $File_size, $File_name, 
$File_type, $page, $src;
echo "
My Files";
$Folder = "article_files";
if(isset($src)) {
FileDetails($src);
Close();
}
if ($Upload) {
$File_name = strtolower($File_name);
$File_name = ereg_replace(" ","_","$File_name");
$File_name = ereg_replace("#","hash","$File_name");
$upfile = "../$Folder/$File_name";  
if($File_name == "$PHP_SELF" or $File_name == "resize_image.php" or $File_name == 
"login.php" or $File_name == "logout.php" or $File_name == "latest.txt" or 
eregi("index",$File_name)) {  
echo "For security reasons, your file could not be 
uploaded.\n";
}
elseif(copy($File,$upfile)) {
if(is_uploaded_file($File_name)) {
echo "Your file, $File_name, 
was successfully uploaded.\n";
FileDetails($File_name);
$time = time();
$query = "insert into article_files 
values(null,'$username','$File_name','$File_size','$File_type','$time')";
mysql_query($query);
} else {
echo "Your file was not copied.\n";
}
}
//unlink ($File);
Close();
}
if($Delete) {  
for($i=0; $i";
if(unlink("$Delete[$i]")) {
echo "Your file, $Delete[$i], was successfully 
deleted.\n";
} else {
echo "Your file, $Delete[$i], could not be 
deleted.\n";
}
}
Close();
}
if($Rename) { // Handle file renaming
for($n = 0; $n < count($Rename); $n++) {
$OldFilename = $Rename[$n];
$NewName[$OldFilename] = strtolower($NewName[$OldFilename]);
$NewName[$OldFilename] = ereg_replace(" ","_","$NewName[$OldFilename]");
$NewName[$OldFilename] = ereg_replace("#","number","$NewName[$OldFilename]");
$Old = "$OldFilename";
$New = "$NewName[$OldFilename]";
echo "";
if(rename($Old, $New)) {
echo "Your file, $Rename[$n], was successfully renamed 
to $NewName[$OldFilename].\n";
} elseif($New=="manage.php" or $New=="index.php" or $New=="index.html" or 
$New=="index.htm" or $New=="index.shtml" or $New=="index.shtm" or $New=="index.asp" or 
$New=="login.php" or $New=="logout.php" or $New=="files.php" or 
$New=="resize_image.php" or $New=="latest.txt") {
echo "Your file, $Rename[$n], could not be 
renamed.\n";
} else {
echo "Your file, $Rename[$n], could not be 
renamed.\n";
}
}
Close();
}
echo "\n
File NameFile 
SizeAddedDeleteRename (Enter new 
name in the box)Details\n";
$query = "select * from article_files where owner='$username' order by filename asc";
$result = mysql_query($query);
while($row = mysql_fetch_array($result)) {
$Size = $row[filesize];
$Size = $Size/1023;
if($Size < 1023){
$Size = number_format($Size, 2);
$Size = $Size." kb";
} else {
$Size = $Size/1023;
$Size = number_format($Size, 2);
$Size = $Size." mb";
}
$type = GetExtension($row[filename]);
if($type == "jpg" or $type == "gif" or $type == "png" or $type == "txt" or $type == 
"sql")
$details = "Details";
else
$details = "N/A";
$Date = date("m/d/y", $row[filedate]);
echo "
$row[filename]
$Size
$Date
  


  




$details

";
}
echo " ";
echo "";
echo "
  

Upload a file:  



  
  





\n
}

All that is included within a main program and when you send data out from this it 
gets looped back into itself with the global statements, that's the idea anyway.  
However, $File_name always turns up null, (as well as the other operators) which makes 
uploading not possible.
- Original Message -
From: SenthilVelavan
Sent: Friday, June 14, 2002 10:49 PM
To: Nathan Taylor; php-general
Subject: Re: [PHP] Confusion with the $_name $_type $_size Variable Extensions

-Lakario,
Please have a look on
http://www.php.net/manual/en/features.file-upload.php  for more information
on fileuploads in php.Also check with the size of the files you have
transferred.When file size is large, then your files won't get uploaded.This
is due to the low execution time,If you don't mind please send your programs
to dig more.
regards,
SenthilVelavan.P

- Original Message -
From: "Nathan Taylor" <[EMAIL PROTECTED]>
To: "php-general" <[EMAIL PROTECTED]>
Sent: Saturday, June 15, 2002 6:46 AM
Subject: [PHP] Confusion with the $_name $_type $_size Variable Extensions


I am having a lot of trouble with the $_name, $_size, and $_type
variable extensions.  I have a basic file upload system however it is
within a function.  Sometimes when I declare the aforementioned
variables in a global statement such as global $file_name I can get a
value for _name, other times, I get nothing.  Can someone clarify
this because I was unable to find anything in the manual?

Cheers,

Lakario
ModDev.netGet more from the Web.  FREE MSN Explorer download :
http://explorer.msn.com



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



Re: [PHP] Downside to using login sessions?

2002-06-15 Thread Nathan Taylor


As a general rule it is always good to store data that is secure in a encrypted 
format.  My website for example uses a mysql database and I store the encrypted mysql 
password in the cookie so I get somethign like 435gcg34tsskhj57 to equal 123.  It's 
far more secure because cookies are on the user's computer and anything there is not 
secure, regardless of who the owner is.

- Original Message -
From: Leif K-Brooks
Sent: Saturday, June 15, 2002 5:53 AM
To: Justin French
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Downside to using login sessions?

I'm currently storing the username and password directly in cookies (the
password isn't even md5()'d).  I'm just wondering if there's security
risks/whatever in sessions.  I've seen that most sites seem to store the
login data directly in the cookie (with the password md5()'d).  Is that
because there's something wrong with sessions, or did they just not use
them for no reason?  Thanks.

Justin French wrote:

>How is it currently storing it?
>
>Sessions are fine, depending on how the code is written, and the obviouse
>downside to COOKIE based sessions is that they will break on non-cookie
>browsers, so a smarter move is to use URL based sessions.
>
>A more focused question will of course result in a more focused answer :)
>
>Justin French
>
>
>on 15/06/02 6:59 PM, Leif K-Brooks ([EMAIL PROTECTED]) wrote:
>
>
>
>>I am planning to change how my site stores logins to using sessions.
>>Are there any reasons not to do this?  Reasons against it I should
>>know?  Thanks for your input.
>>
>>
>>
>
>
>
>Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com



Re: [PHP] PHP timeout

2002-06-15 Thread Nathan Taylor

Hmm, I haven't heard of such a thing. That's kinda weird though because just yesterday 
I modified my timeout settings for my script that parses logfiles that are several 
thousand lines long, and it worked. Did you perhaps forget to reboot the server? If 
you have my suggestion is perhaps taking a look at FoxServ, it is a very good server 
that auto configures itself on your machine with apache and the whole lot.   
www.foxserv.net   

- Original Message -
From: Kim Bauters
Sent: Saturday, June 15, 2002 5:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP timeout

I'm running PHP script that check for the existance of certain pages on the
web. The problem is that fopen to check for the existance of a page and this
seems to consume time. It has to check for a nuber of pages, conforming to a
certain pattern. This pattern is Ab#

What I want to do is extend the time a script is allowed to run (because I
can only check 10 pages, then need to change the code for the next pages)
but I don't seem to be able to do this. I'm using Windows 2000 and PHP is
installed on my IIS server. In the file php.ini, the 2 timeout settings are
both changed from 30 to 300, but I keep on getting an error like "CGI script
Timeout".

Can anyone help?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



Re: [PHP] saving a jpeg via HTTP

2002-06-15 Thread Nathan Taylor

Perhaps you could try a cURL or some other FTP approach?

- Original Message -
From: Jeff Bearer
Sent: Saturday, June 15, 2002 11:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] saving a jpeg via HTTP

What is the best way using only PHP to grab a image file off a website a
d save it locally?  I know I can use wget and this would be a piece of
cake, but in this case I don't want to rely on external programs.

I'm trying to read it with fsockopen and writing it with fopen to the
file  but the file is no good when it's saved, I saw that it saved the
http headers in there so I cut those out but still, the image wan't
viewable.

I was using fsockopen instead of file because I want to use the timeout
feature of fsockopen.

any help is appriciated.

--
Jeff Bearer, RHCE
Webmaster, PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



Re: [PHP] Can't set a cookie?

2002-06-15 Thread Nathan Taylor

The 3rd parameter is an optional time to expire parameter, if you don't want to set 
it, leave it out.  setcookie(cookiename,"value");  works fine

- Original Message -
From: Lazor, Ed
Sent: Saturday, June 15, 2002 11:48 AM
To: php-general
Subject: [PHP] Can't set a cookie?

Hi Everyone,

Any idea why I'm getting this error?

Warning: setcookie() expects parameter 3 to be long, string given in *my
script* on line 2

Here's the entire script generating the error:



The script doesn't work on a new hosting service I subscribed to, but it
works on two other servers - 1 linux and 1 windows, both with Apache 1.3.24.
I'm looking for what version the hosting service is using... their support
page says "PHP4 with Zend Optimizer".  The other two servers are using PHP
4.1.1.

Any ideas of what's going on?

-Ed


This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



Re: [PHP] Parsing Text File

2002-06-15 Thread Nathan Taylor

This is all really straight forward stuff.  Here's some code that will get the file 
parsed to an array, what you do from there is up to you.



Note: if you have a precise structure for your lines you can say to read from point a 
to b using substr().  For example, let's say the first name is exactly 3 characters in 
from 0  and exactly 10 characters long so you could do substr($line_array[0], 3, 10);  
This is a really dirty way to handle this and I'm sure there are better ways so poke 
around a bit.  Also if you have your phone number located down to a specific location 
you can use an explode statement to get both area code and main number seperated.


- Original Message -
From: Jason D. Williard
Sent: Saturday, June 15, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing Text File

I am trying to input data from a text file into a MySQL database and would
like to be able to input the data using a single script.  What's the easiest
way to parse a line, such as below, and turn it into variables to be placed
in the database.  While I can simply place the data in by importing from a
file, it's not quite so easy.  I only need to place some of the data in,
plus I would like to split one of the fields.  Below is an example of a line
from the file, and then the variables that I need to enter.

Here is an example of a line from the file:
Number,City,State,Country,Provider,Isdn,56K,CreateDate,Active,Timezone,ModDa
te,ModNote
403 -770 -4904 ,CALGARY,AB,CAN,T2,Y,Y,Apr 29 2002
12:00:00:000AM,I,GMT-0700,,

As for variables, I need the following:
Split Number into $AreaCode & $Number > 403 & 770-4904
$City
$State
$Country

Thanks for any help.

Jason D. Williard





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.phpGet more from the Web.  FREE MSN 
Explorer download : http://explorer.msn.com



Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor


- Original Message -
From: "Fargo Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 4:14 PM
Subject: [PHP] How do I hide download link ...


> Hi, my customers go through a password authentication to access a link on
my
> site to download a file. I want to prevent the distribution of the
location
> of this file on my server by making it hidden. Is there any php
function(s)
> that could assist in doing this?
>
> All I can think of so far is storing the original file in a hard to guess
> directory, when a authenticated customer goes to download it, send them to
a
> script that copys the original file to a temp directory, they download the
> file in the temp directory and then run a cron every so many minutes to
> clear out the files in the temp directory.
>
> If anyone has any ideas, examples or a way to improve on what I came up
with
> please respond. Thanks!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor

I don't believe it is possible to hide the physical link but it is plausibly
easy enough to write a script that randomly changes the file name and
location. Here's some psuedo code to get you started:

//Step 1: Locate the file
$query = "select * from file_locations where file_name='secure.zip'";
$result = mysql_query($query);

//Step 2: Move the file
This code is up to you, I'd be curious to think what routine you think up if
any.  My suggestions include using a routine to not only change the file
name but copy it to a different directory, which also has a non specific
name.

//Step 3: Update Location (don't want to lose the location)
$query = "update file_locations set location=$newlocation where
file_name='secure.zip'";
mysql_query($query)

Best of Luck to you,
Nathan Taylor
ModDev.net



- Original Message -
From: "Fargo Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 4:14 PM
Subject: [PHP] How do I hide download link ...


> Hi, my customers go through a password authentication to access a link on
my
> site to download a file. I want to prevent the distribution of the
location
> of this file on my server by making it hidden. Is there any php
function(s)
> that could assist in doing this?
>
> All I can think of so far is storing the original file in a hard to guess
> directory, when a authenticated customer goes to download it, send them to
a
> script that copys the original file to a temp directory, they download the
> file in the temp directory and then run a cron every so many minutes to
> clear out the files in the temp directory.
>
> If anyone has any ideas, examples or a way to improve on what I came up
with
> please respond. Thanks!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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




[PHP] Don't send the reciept

2002-06-18 Thread Nathan Taylor

Please do not click yes when it asks you to send the reciept on the email
about hiding a download link, I hadn't realized the reciept function was on
and it's really getting annoying.

Cheers,
Lakario

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor

> if (!session_is_registered("SESSION")){
>  print ("You must Log-In to access this page\n");
>  print ("");
>  print ("Click here to Log In");
> }

print ("");

should be:

print("Sign-in");   // or something like that


But anyways, I don't think that's quite what he wanted.  I think the idea is
to protect the link to a file so only special users can see it.  Sure this
code with protect the page from being viewed, but, download.php or whatever,
if it is protected it still points to a physical file.   If a user for some
reason desires to leak the actual link then there could be a problem.  This
is why he probably should change the physical file data.

- Original Message -
From: "Bret L Conard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 6:22 AM
Subject: Re: [PHP] How do I hide download link ...


> Start a session on the sign in page, and check for the session before
> displaying the page with the link. The it does not matter if the link page
> URL is distributed. In my situation;
> 1. Sign in page goes to a validation script.
> 2. Check for form fields. (1st of Nested loops)
> if (isset($formField)){//check for form.
> 3. If form, validate user and start session
> $result = mysql_query("SELECT * FROM ok_users WHERE password =
> $password AND user_ID = $user_ID");
> if (mysql_num_rows($result) < 1){// No user so exit
> if (mysql_num_rows($result) > 1){// Too many users (bad data) so
> exit
> else{   //valid user
> session_start();
>// register the variables you need or want
> session_register("SESSION");.
> 4. redirect to page with download
>header ("Location: download.php");
>  must be in the session start snippet or get too many headers errors
> /
> }//end start session code
>   }//end check for multiple match
>  }//end check for form (and other actions)
>  else{//if no form.
> print ("You must login to access this page");
> }
> 5. On download page check for session.
>  session_start();
> // ***   session check*/
> if (!session_is_registered("SESSION")){
>  print ("You must Log-In to access this page\n");
>  print ("");
>  print ("Click here to Log In");
> }
> else{
> body of page
> }
>
> Now if you access the download page directly, you only get a link to sign
> in...
>
> Does this help?
> Bret
>
>
> - Original Message -
> From: "Fargo Lee" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 12, 2002 4:14 PM
> Subject: [PHP] How do I hide download link ...
>
>
> > Hi, my customers go through a password authentication to access a link
on
> my
> > site to download a file. I want to prevent the distribution of the
> location
> > of this file on my server by making it hidden. Is there any php
> function(s)
> > that could assist in doing this?
> >
> > All I can think of so far is storing the original file in a hard to
guess
> > directory, when a authenticated customer goes to download it, send them
to
> a
> > script that copys the original file to a temp directory, they download
the
> > file in the temp directory and then run a cron every so many minutes to
> > clear out the files in the temp directory.
> >
> > If anyone has any ideas, examples or a way to improve on what I came up
> with
> > please respond. Thanks!
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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




Re: [PHP] How do I hide download link ...

2002-06-18 Thread Nathan Taylor

Open your browser, right click and hit properties on any page.

- Original Message -
From: "Brian McGarvie" <[EMAIL PROTECTED]>
To: "Nathan Taylor" <[EMAIL PROTECTED]>; "Bret L Conard" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 6:46 AM
Subject: RE: [PHP] How do I hide download link ...


if you want to hide it fromthe browser you cound do:

click
here

or you could over write the status text:

click here

or a combination...

Also note... this has/had nowt to do with _PHP_ :)

> -Original Message-
> From: Nathan Taylor [mailto:[EMAIL PROTECTED]]
> Sent: 18 June 2002 11:33 AM
> To: Bret L Conard; [EMAIL PROTECTED]
> Subject: Re: [PHP] How do I hide download link ...
>
>
> > if (!session_is_registered("SESSION")){
> >  print ("You must Log-In to access this page\n");
> >  print ("");
> >  print ("Click here to Log In");
> > }
>
> print ("");
>
> should be:
>
> print("Sign-in");   // or something
> like that
>
>
> But anyways, I don't think that's quite what he wanted.  I
> think the idea is
> to protect the link to a file so only special users can see
> it.  Sure this
> code with protect the page from being viewed, but,
> download.php or whatever,
> if it is protected it still points to a physical file.   If a
> user for some
> reason desires to leak the actual link then there could be a
> problem.  This
> is why he probably should change the physical file data.
>
> - Original Message -
> From: "Bret L Conard" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, June 18, 2002 6:22 AM
> Subject: Re: [PHP] How do I hide download link ...
>
>
> > Start a session on the sign in page, and check for the
> session before
> > displaying the page with the link. The it does not matter
> if the link page
> > URL is distributed. In my situation;
> > 1. Sign in page goes to a validation script.
> > 2. Check for form fields. (1st of Nested loops)
> > if (isset($formField)){//check for form.
> > 3. If form, validate user and start session
> > $result = mysql_query("SELECT * FROM ok_users WHERE
> password =
> > $password AND user_ID = $user_ID");
> > if (mysql_num_rows($result) < 1){// No user so exit
> > if (mysql_num_rows($result) > 1){// Too many users
> (bad data) so
> > exit
> > else{   //valid user
> > session_start();
> >// register the variables you need or want
> > session_register("SESSION");.
> > 4. redirect to page with download
> >header ("Location: download.php");
> >  must be in the session start snippet or get too many
> headers errors
> > /
> > }//end start session code
> >   }//end check for multiple match
> >  }//end check for form (and other actions)
> >  else{//if no form.
> > print ("You must login to access this page");
> > }
> > 5. On download page check for session.
> >  > session_start();
> > // ***   session check*/
> > if (!session_is_registered("SESSION")){
> >  print ("You must Log-In to access this page\n");
> >  print ("");
> >  print ("Click here to Log In");
> > }
> > else{
> > body of page
> > }
> >
> > Now if you access the download page directly, you only get
> a link to sign
> > in...
> >
> > Does this help?
> > Bret
> >
> >
> > - Original Message -
> > From: "Fargo Lee" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, June 12, 2002 4:14 PM
> > Subject: [PHP] How do I hide download link ...
> >
> >
> > > Hi, my customers go through a password authentication to
> access a link
> on
> > my
> > > site to download a file. I want to prevent the distribution of the
> > location
> > > of this file on my server by making it hidden. Is there any php
> > function(s)
> > > that could assist in doing this?
> > >
> > > All I can think of so far is storing the original file in
> a hard to
> guess
> > > directory, when a authenticated customer goes to download
> it, send them
> to
> > a
> > > script that copys the original file to a temp directory,
> they do

[PHP] Procedural Code Issue

2003-09-07 Thread Nathan Taylor
Hey Guys,

I am developing code that uses GD to create and store an image but it is giving me 
trouble with GetImageSize, maybe you guys can offer some ideas.  Here's my code:

echo "\n";

$img_data = GetImageSize($imgpath.$imgname_full);

The first line creates and stores the image while the second line calls file 
information on it.  Procedurally, the image exists at the point which GetImageSize is 
called, however, GetImageSize returns a false result on the pointer when it looks for 
the file. All the paths are fine but there is something going cock-eyed during the 
execution.

Can anyone offer ideas?  I have already tried both declaring an absolute path and 
checking the variables arlready.

Thanks,
Nathan Taylor

[PHP] Possible Bug With $_FILES Global

2003-09-18 Thread Nathan Taylor
Hey Guys,

I discovered a possible bug with the $_FILES super global and thought I'd pass it 
along to you guys to double check the accuracy of this being a bug before I reported 
it to the PHP team.   So here goes..

The default format for $_FILES is $_FILES['variable']['element'] which of course works 
fine, following this format I would assume that the format for a variable inside an 
array would be $_FILES['array']['variable']['element'] but on the contrary it is in 
fact $_FILES['array']['element']['variable'].  Somehow this doesn't seem quite right 
to me.  Granted, it still works just as well but it sort of breaks the traditional 
naming structure for an array and really jumbles the logical flow of things.  Do you 
think this is worth reporting?

Regards,
Nathan Taylor

Re: [PHP] dir size

2003-10-03 Thread Nathan Taylor
Hey, I think I mis-understood you and my first version didn't do what you want, so I 
added what you needed.

 0) {
   $open2 = opendir($directory);
   while($folders = readdir($open2)) {
$folder = $directory."/".$folders;
if($folders == ".." || $folders == ".") continue;
if(is_dir($folder)) {
 echo DirStat($folder);
}
   }
   closedir($open2);
  }
  closedir($open);
 }
}

function ByteSize($bytes) {
  $size = $bytes / 1024;
  if($size < 1024){
   $size = number_format($size, 2);
   $size .= "kb";
  } else {
   if($size / 1024 < 1024) {
$size = number_format($size / 1024, 2);
$size .= "mb";
   } else {
$size = number_format($size / 1024 / 1024, 2);
$size .= "gb";
   }
  }
  return $size;
 }

$dir = getcwd();
DirStat("tmp", 0);
chdir($dir);

$FolderSize = ByteParse($FolderSize);

echo $FileCount;
echo "\n";
echo $FolderSize;

?>


The DirStat() function is almost unchanged except that it now passes out the byte size 
of the directories read. I also threw in a chdir() to get you back to your working 
directory. The major addition here is the ByteSize() function.  That function takes 
the integer which is your total size of the directory and converts it into a nice 
formatted number either in kb, mb, or gb accordingly.  You'll find it uses true file 
size as well, not "industry standard" sizing.

Enjoy,
Nathan Taylor
  - Original Message - 
  From: Ms Carlsson 
  To: [EMAIL PROTECTED] 
  Sent: Friday, October 03, 2003 2:44 PM
  Subject: [PHP] dir size


  is it possible to count  a size of a dir and all sub dirs in php ? and if, 
  how?

  thanx

  _
  Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/

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



Re: [PHP] hotscripts style program

2003-10-04 Thread Nathan Taylor
Are you looking to make a new HotScripts style website or just a similar menu system?
  - Original Message - 
  From: Ryan A 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, October 04, 2003 9:28 AM
  Subject: [PHP] hotscripts style program


  Hey,
  Anybody have any code or links to explain how to make a program like the one
  running on hotscripts?
  eg:
  when you visit there you have a couple of categories like : ASP, JAVA, PHP
  etc
  (if you select php)
  PHP
  --Scripts
  --Books
  --tutorials
  (if you select scripts)
  --Scripts
  category1(324)
  category2(24)
  category3(54)
  etc

  the number in brackets at the side of the category says how many records

  I downloaded PHPlinks but have been unable to understand it.
  Another good place that i visited was
  http://www.hotscripts.com/PHP/Scripts_and_Programs/Software_Repository/index.html
  and even searched on google but cant find much.

  Any help appreciated.

  Thanks,
  -Ryan

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



Re: [PHP] .htaccess - Still asking for login information although already sent through address bar

2003-10-06 Thread Nathan Taylor
Does it continuously ask or just twice?  I've found a weird issue with .htaccess where 
if the domain name is a mask for a subdomain host and you try to access an .htaccess 
protected page it will prompt you for the password, redirect you to the subdomain and 
then prompt you again.

Nathan 
  - Original Message - 
  From: Mika Tuupola 
  To: PHP Webmaster 
  Cc: [EMAIL PROTECTED] 
  Sent: Monday, October 06, 2003 7:12 AM
  Subject: Re: [PHP] .htaccess - Still asking for login information although already 
sent through address bar


  On Mon, 6 Oct 2003, PHP Webmaster wrote:

  > Iv'e got a .htaccess file protecting a site using HTTPS. I have tried using
  > a form to send the login details to the site through the address bar
  > (http://user:[EMAIL PROTECTED]) but the .htaccess password protection box

  That does not look like https. Try changing to

  https://user:[EMAIL PROTECTED]/

  -- 
  Mika Tuupola  http://www.appelsiini.net/~tuupola/

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



Re: [PHP] Congratulations You Win

2003-10-08 Thread Nathan Taylor
WTF is this?
  - Original Message - 
  From: Francis Weeny 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 08, 2003 10:30 PM
  Subject: [PHP] Congratulations You Win 


  SUNSWEETWIN PROMO LOTTERY,THE NETHERLANDS. 
  ALFONSTRAAT B56, 
  1002 BS AMSTERDAM, THE NETHERLANDS. 
  TO THE MANAGER 
  FROM: THE DESK OF THE PROMOTIONS MANAGER, 
  INTERNATIONAL PROMOTIONS/PRIZE AWARD DEPARTMENT, 
  REF: OYL /26510460037/02 
  BATCH: 24/00319/IPD 
  ATTENTION: 
  RE/ AWARD NOTIFICATION; FINAL NOTICE 
  We are pleased to inform you of the announcement 
  today,  7th October2003 of winners of the SUNSWEETWIN PROMO
  LOTTERY,THE 
  NETHERLANDS/ INTERNATIONAL, PROGRAMS held on 28th August 2003

  Your company,is attached to ticket number 
  023-0148-790-459, with serial number 5073-11 drew 
  the lucky numbers 43-11-44-37-10-43, and consequently 
  won the lottery in the 3rd category. 
  You have therefore been approved for a lump sum pay 
  out of US$5,500.000.00 in cash credited to file REF 
  NO. OYL/25041238013/02. This is from total prize money
  of 
  US$80,400,000.00 shared among the seventeen
  international winners in
  this category. All participants were selected through
  a computer 
  ballot
  system drawn form 25,000 names from Australia, New 
  Zealand, America, Europe, North America and Asia as
  part of 
  International Promotions Program, which is conducted 
  annually. 
  CONGRATULATIONS! 
  Your fund is now deposited with a Security company 
  insured in your name. Due to the mix up of 
  some numbers and names, we ask that you keep this
  award strictly 
  from 
  public notice until your claim has 
  been processed and your money remitted to your
  account. 
  This is part of our security protocol to avoid 
  double claiming or unscrupulous acts by participants
  of 
  this program.  
  We hope with a part of you prize, you will 
  participate in our end of year high stakes US$1.3
  billion 
  International Lottery. 
  To begin your claim, please contact your claim 
  agent; Mr Francis weeny at this email address below.
  [EMAIL PROTECTED]
  For due processing and remittance of your prize 
  money to a designated account of your choice. 
  Remember, all prize money must be claimed not later 
  than 17th October 2003. After this date, all funds will 
  be returned as unclaimed. 
  NOTE: In order to avoid unnecessary delays and 
  complications, please remember to quote your 
  reference and batch numbers in every one of your 
  orrespondences with your agent. 
  Furthermore, should there be any 
  change of your address, do inform your claims agent 
  as soon as possible. 
  Congratulations again from all our staff and thank 
  you for being part of our promotions program. 

  Sincerely, 
  Clark Wood
  THE PROMOTIONS MANAGER, SUNSWEETWIN PROMO LOTTERY,THE
  NETHERLANDS.
  NB. Any breach of confidentiality on the part of 
  the winners will result to disqualification. 
  SORRY FOR THE LATE INFORMATION THANKS 
  CLARK  WOOD


   

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



[PHP] Credit Card Validation

2003-10-08 Thread Nathan Taylor
Hey guys (and gals),

I am sure this has been asked many times before, but I couldn't seem to find a recent 
PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or it 
doesn't exist.

My question is pretty obvious, I was wondering what the process for validating a 
credit cards with both preprocessing by the form to determine the pattern validity and 
post processing by a bank to confirm the actual card validity.

Your help would be greatly appreciated.

Best Wishes,
Nathan Taylor

Re: [PHP] Credit Card Validation

2003-10-08 Thread Nathan Taylor
The fact is I just pulled up google and typed in PHP-General Archives and clicked the 
first thing I came up with.  Thanks for the link though.
  - Original Message - 
  From: Becoming Digital 
  To: php-general 
  Sent: Wednesday, October 08, 2003 4:10 PM
  Subject: Re: [PHP] Credit Card Validation


  There are a few classes in the Repository.  Check the link below.
  http://phpclasses.promoxy.com/browse.html/class/19.html

  Not to discount PHP Builder, but I generally find less useful info there than I do 
at DevShed.com, DevArticles.com, etc.  The structure of the site certainly doesn't 
make the process any easier.

  Edward Dudlik
  Becoming Digital
  www.becomingdigital.com



  - Original Message - 
  From: "Nathan Taylor" <[EMAIL PROTECTED]>
  To: "php-general" <[EMAIL PROTECTED]>
  Sent: Wednesday, 08 October, 2003 16:03
  Subject: [PHP] Credit Card Validation


  Hey guys (and gals),

  I am sure this has been asked many times before, but I couldn't seem to find a 
recent PHP4-based thread in the logs at phpbuilder.com; so either I'm incompetent or 
it doesn't exist.

  My question is pretty obvious, I was wondering what the process for validating a 
credit cards with both preprocessing by the form to determine the pattern validity and 
post processing by a bank to confirm the actual card validity.

  Your help would be greatly appreciated.

  Best Wishes,
  Nathan Taylor

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



Re: [PHP] Credit Card Validation

2003-10-08 Thread Nathan Taylor
I'll take a look through that and do as much further research as is possible.  Thanks.
  - Original Message - 
  From: Craig Lonsbury 
  To: Nathan Taylor ; php-general 
  Sent: Wednesday, October 08, 2003 4:04 PM
  Subject: RE: [PHP] Credit Card Validation


  this is a good explanation of the validation you can do.
  http://www.beachnet.com/~hstiles/cardtype.html

  if you are trying to validate client-side you'll need javascript,
  which is why there may not be anything on phpbuilder

  i have no idea about the bank side, but post any info you find out
  back here, it is coming up soon for me =)

  hth,
  Craig

  -Original Message-
  From: Nathan Taylor [mailto:[EMAIL PROTECTED]
  Sent: October 8, 2003 2:04 PM
  To: php-general
  Subject: [PHP] Credit Card Validation


  Hey guys (and gals),

  I am sure this has been asked many times before, but I couldn't seem to
  find a recent PHP4-based thread in the logs at phpbuilder.com; so either
  I'm incompetent or it doesn't exist.

  My question is pretty obvious, I was wondering what the process for
  validating a credit cards with both preprocessing by the form to
  determine the pattern validity and post processing by a bank to confirm
  the actual card validity.

  Your help would be greatly appreciated.

  Best Wishes,
  Nathan Taylor

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



Re: [PHP] function to show time passed since event

2003-10-08 Thread Nathan Taylor
Sure, this isn't tough at all as long as you keep track of your times.

When the user logs in store the time() in a cookie or database. Then to check the time 
since do this

\n";
echo "Then: ".date("m/d/y g:ia", $timesince)."\n";

?>


That should be right, I think...
  - Original Message - 
  From: Chris W. Parker 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 08, 2003 7:34 PM
  Subject: [PHP] function to show time passed since event


  Hiya.

  Tried searching google with no luck on this one.

  I'd like a function that when passed a time will spit back in plain
  english how much time has passed.

  i.e.

  You logged in "one hour ago".


  


  Anyone got da hookup?


  Thanks,
  Chris.

  p.s. Now with signature!

  --
  Don't like reformatting your Outlook replies? Now there's relief!
  http://home.in.tum.de/~jain/software/outlook-quotefix/

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



Re: [PHP] Need Charting Utility

2003-10-09 Thread Nathan Taylor
Look into JpGraph, it rocks my world.

http://www.aditus.nu/jpgraph/ 

Nathan
  - Original Message - 
  From: rick rice 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, October 09, 2003 2:30 PM
  Subject: [PHP] Need Charting Utility


  Can anyone suggest a good charting utility for PHP running on a freeBSD box?
  We need to put line/bar charts on our web pages.

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



Re: [PHP] $PHP_SELF

2003-10-20 Thread Nathan Taylor
$PHP_SELF is a variable that is a variable that has limited scope and as a rule of 
thumb should never be used. It is a very sloppy way to code.  I advise you stick to 
$_SERVER['PHP_SELF'].
  - Original Message - 
  From: Boris Sagadin 
  To: [EMAIL PROTECTED] 
  Sent: Monday, October 20, 2003 7:23 AM
  Subject: [PHP] $PHP_SELF



  I'm having problems with $PHP_SELF variable. Mostly it works, other
  times (about 10% of tries) it's just empty. Is this a known issue with Apache
  2? If I use $_SERVER['PHP_SELF'], it always works fine, but still I'd
  like to know if this is a common bug or there's something wrong with
  my configuration.

  I'm using PHP 4.3.3 with Apache 2.0.43, Linux 2.4.21-grsec, register_globals is on

  Thanks,
  Boris

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



Re: [PHP] need help designing a job search agent

2003-10-20 Thread Nathan Taylor
Are you looking for something that job listings are added to by companies or something 
that crawls the web for listings?

Nathan

[PHP] Archives

2003-10-22 Thread Nathan Taylor
Hey guys,

Just a quickie: where are the archives for this list? What URL?

Thanks,
Nathan Taylor

Re: [PHP] Archives

2003-10-22 Thread Nathan Taylor
Thanks John and and Chris.
  - Original Message - 
  From: John Nichel 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 22, 2003 2:26 PM
  Subject: Re: [PHP] Archives


  Nathan Taylor wrote:
  > Hey guys,
  > 
  > Just a quickie: where are the archives for this list? What URL?
  > 
  > Thanks,
  > Nathan Taylor

  Here...
  http://marc.theaimsgroup.com/?l=php-general&r=1&w=2

  or here...
  http://news.php.net/group.php?group=php.general

  -- 
  By-Tor.com
  It's all about the Rush
  http://www.by-tor.com

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



Re: [PHP] Code optimization: single vs. double quotes?

2003-10-24 Thread Nathan Taylor
I am a recent fan of the single-quotes.  I used to use double only but when some gurus 
told me the disadvantages I converted my entire project over to single quotes.  Single 
quotes are ideal because as far coding goes it greatly decreases the time of 
development when you don't have to worry about dropping in the escape character on 
your HTML values, etc.  Granted, single quotes can be a nuisance in some instances 
(like when you need a new line character) but of course there is a way around.  I 
simply define a constant and call that at the end of every line in order to substitute 
for the new line character.

Horizontal Tab - define("T", chr(9));
New Line - define("NL", chr(10));

Cheers,
Nathan
  - Original Message - 
  From: Robert Cummings 
  To: Shawn McKenzie 
  Cc: PHP-General 
  Sent: Thursday, October 23, 2003 10:30 PM
  Subject: Re: [PHP] Code optimization: single vs. double quotes?


  On Thu, 2003-10-23 at 20:43, Shawn McKenzie wrote:
  > I came across this post and was hoping to get a gurus opinion on the
  > validity.  TIA
  > 
  > -Shawn
  > 
  > I remember reading somewhere re: PHP coding that it is a better coding
  > practice to use single quotes as much as possible vs. using double quotes in
  > scripts. When using double quotes, you are forcing PHP to look for variables
  > within them, even though there may not be any, thus slowing execution
  > time...
  > 
  > For example it is better to code:
  >   Code:
  >   echo ' ';
  > 
  > vs.
  >   Code:
  >   echo " ";

  Better is a very subjective question; however, style 1 will run faster
  since it won't look for variable interpolation. Personally I always use
  style 1 unless I specifically need variable interpolation or one of the
  special characters such as a newline. Also when doing HTML the double
  quotes fit nicely in the the single quote paradigm. On the other hand
  when I do SQL queries, I often allow interpolation just because it is
  more readable and because I usually use single quotes to wrap strings in
  my queries.

  HTH,
  Rob.
  -- 
  ..
  | InterJinn Application Framework - http://www.interjinn.com |
  ::
  | An application and templating framework for PHP. Boasting  |
  | a powerful, scalable system for accessing system services  |
  | such as forms, properties, sessions, and caches. InterJinn |
  | also provides an extremely flexible architecture for   |
  | creating re-usable components quickly and easily.  |
  `'

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



Re: [PHP] HTTP request contents

2003-10-24 Thread Nathan Taylor
Perhaps $_SERVER['REQUEST_URI'] in combination with $_SERVER['QUERY_STRING'] ?

Nathan
  - Original Message - 
  From: Hanuska Ivo 
  To: [EMAIL PROTECTED] 
  Sent: Friday, October 24, 2003 6:10 AM
  Subject: [PHP] HTTP request contents


  Hi everyone,

  I need to know, if there is a possibility to read full contents of HTTP request. I 
know, the response can be sent by header() function. But can I get the request of the 
client for server?

  Thank you,

  Ivo

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



Re: [PHP] w3c-compliant form-action parameters

2003-10-24 Thread Nathan Taylor
This problem should be handled by modifying the php.ini.  In my experience W3C is a 
whiney bitch that always gets it's way. Just throw this code on all your pages (or 
better yet, in a header) and the problem will go away.

// The communists at W3C don't like the ampersand, so let's make sure it isn't used.
ini_set('arg_separator.output', '&');

Cheers,
Nathan Taylor
  - Original Message - 
  From: Burhan Khalid 
  To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
  Sent: Friday, October 24, 2003 3:43 PM
  Subject: Re: [PHP] w3c-compliant form-action parameters


  Chris Shiflett wrote:

  > --- Timo Boettcher <[EMAIL PROTECTED]> wrote:
  > 
  >>I am trying to get my pages through the w3c-validator for html.
  >>It doesn't like my
  >>
  >>Changing & to & got my page through the validator, but broke
  >>my app, which seems not to be getting any parameters over URL
  >>anymore.
  > 
  > 
  > I find that *very* hard to believe. I'm not aware of any browser that
  > mishandles HTML entities. Basically, when you say this:
  > 
  > action="/mypage.php?para1=val1&para2=val2"
  > 
  > Your browser's HTTP request line will appear as:
  > 
  > /mypage.php?para1=val1¶2=val2
  > 
  > So, by the time PHP sees it, everything is the same either way. My guess is
  > that you have some other problem.

  I agree with Chris. This is not a browser problem.

  However, there is a php.ini setting that will allow you to set the 
  separator for get requests, but I suggest you investigate this problem 
  further.

  -- 
  Burhan Khalid
  phplist[at]meidomus[dot]com
  http://www.meidomus.com

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



[PHP] Handling Notices

2003-10-27 Thread Nathan Taylor
Hey guys,

I was checking over one of my sites the other day trying to weed out the elusive 
notices that E_ALL turned up and I got some notices that I'm not too sure how to 
handle.

I know how to handle most of these errors however the ones that are snagging me up are 
the "Notice: Undefined index: _blah_ in _blah_."  Most of these are array indices in 
super globals such a $_GET, $_SESSION, etc.  How can I get rid of these little buggers?

Thanks,
Nathan Taylor

Re: [PHP] Re: IRC

2003-10-31 Thread Nathan Taylor




Sure Jon, pimp Daeken's channel...
 
BinaryPHP is not what he needs 
 
Nathan

  - Original Message - 
  From: Jon Kriek 
  To: [EMAIL PROTECTED] 
  Sent: Friday, October 31, 2003 4:11 
  PM
  Subject: [PHP] Re: IRC
  server: irc.freenode.netchannels: #phpfreaks, #php, 
  #binaryphp-- Jon Kriekhttp://phpfreaks.com"Jonathan Villa" 
  <[EMAIL PROTECTED]> 
  wrote in messagenews:[EMAIL PROTECTED]...> 
  Are there any PHP IRC that anyone is aware of?-- PHP General 
  Mailing List (http://www.php.net/)To 
  unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Web Applications and C++?

2003-11-01 Thread Nathan Taylor
They tend to use dlls and the sort, but that question is rather inappropriate for this 
list...
  - Original Message - 
  From: John Ryan 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 01, 2003 12:33 PM
  Subject: [PHP] Web Applications and C++?


  I assume sites like Amazon and Ebay does not use PHP to generate its pages.
  Does it use CGI and C++?? If so, does that mean a C++ program is run each
  time I request a page.

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



Re: [PHP] recursive acronym - PHP

2003-11-01 Thread Nathan Taylor
Why must the powers that be create such mind-bendingly painful terms such as these? 
They are the sort of things that send my brain into an infinite loop.

Nathan
  - Original Message - 
  From: Joachim Krebs 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 01, 2003 3:23 PM
  Subject: Re: [PHP] recursive acronym - PHP


  Or LAME for "Lame Ain't an MP3 Encoder"

  Larry E . Ullman wrote:
  >> Why PHP is a recursive acronym?, I know that before was called 
  >> Personal Home Page, I now is Hypertext PreProcessor, but why is 
  >> recursive?, I person told me that it could be wroten as Pre Hypertxt 
  >> Processor, thanks.
  > 
  > 
  > PHP stands for "PHP: Hypertext Preprocessor". It's called a recursive 
  > acronym because it uses itself in its definition. Another example: GNU, 
  > for "GNU's Not Unix".
  > 
  > Larry

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



Re: [PHP] recursive acronym - PHP

2003-11-01 Thread Nathan Taylor
Why must the powers that be create such mind-bendingly painful terms such as these? 
They are the sort of things that send my brain into an infinite loop.

Nathan
  - Original Message - 
  From: Joachim Krebs 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 01, 2003 3:23 PM
  Subject: Re: [PHP] recursive acronym - PHP


  Or LAME for "Lame Ain't an MP3 Encoder"

  Larry E . Ullman wrote:
  >> Why PHP is a recursive acronym?, I know that before was called 
  >> Personal Home Page, I now is Hypertext PreProcessor, but why is 
  >> recursive?, I person told me that it could be wroten as Pre Hypertxt 
  >> Processor, thanks.
  > 
  > 
  > PHP stands for "PHP: Hypertext Preprocessor". It's called a recursive 
  > acronym because it uses itself in its definition. Another example: GNU, 
  > for "GNU's Not Unix".
  > 
  > Larry

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



Re: [PHP] text input truncated

2003-11-04 Thread Nathan Taylor
Your html is very sloppy actually.

Use:

$xyz = 'Hello World';

echo '';
  - Original Message - 
  From: Daniel Clark 
  To: [EMAIL PROTECTED] 
  Cc: [EMAIL PROTECTED] 
  Sent: Tuesday, November 04, 2003 6:49 PM
  Subject: Re: [PHP] text input truncated


  > $xyz = "Hello World";
  >
  > echo "";
  >
  > ?>
  >
  > The text box shows up with "Hello" NOT "Hello World". How do I get the
  > entire variable?


  I would try single quotes here.

  $xyz = 'Hello World';

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



Re: [PHP] Beveled text

2003-11-08 Thread Nathan Taylor
Well, I'm speaking from imagination here but I imagine the effect could be obtained by 
creating a series of layers to one item in a loop, changing the alpha transparency 
slightly each time as well as shrinking the size of the image.  You'd start with 75ish 
alpha level and then loop through one level at a time up a to 100 or something like 
that, shrinking the text gradually and building off the same center each time.

Try it and tell me what happens, I am curious.

Cheers,
Nathan
  - Original Message - 
  From: Siddhartha Lahiri 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 08, 2003 8:45 AM
  Subject: [PHP] Beveled text


  Hi, is it possible to create a beveled text using GD.
  Going through all the classes I have not come across any algorithm which
  explains beveled text.
  Siddhartha

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



Re: [PHP] Pausing in PHP

2003-11-12 Thread Nathan Taylor
sleep() should do what you need.

www.php.net/sleep

Regards,
Nathan
  - Original Message - 
  From: Donpro 
  To: php list 
  Sent: Monday, November 10, 2003 12:49 PM
  Subject: [PHP] Pausing in PHP


  Hi,
   
  Is there a PHP function that would allow the script execution to pause 'N'
  seconds?  This is analogous to the dBase inkey() function.
   
  Thanks,
  Don

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



Re: [PHP] Who controls PHP?

2003-11-15 Thread Nathan Taylor
Hello,

Zend in no way dictates PHP, they are simply a major player in it's development and 
are just as important as the PHP community.  Zend develops much of the core extensions 
for PHP but at the same time, they do not own or even run.

Nathan
  - Original Message - 
  From: John Smith 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 15, 2003 11:59 AM
  Subject: [PHP] Who controls PHP?


  Hi,

  Please, can someone shed a little light on this subject: who controls PHP?

  How much Zend has the power to say what goes into PHP and what not?

  How much does the "community" actually have power?

  For example, there are practical reasons why one should be concerned about
  this: PHP doesn't have an opcode compiler/loader built in. I find this quite
  frustrating to have to use some additional software to do that, which for
  example Java and Python has built-in.

  Please, tell me that Zend is not the dictator here.

  John

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



Re: [PHP] Include an encoder into PHP distribution?

2003-11-15 Thread Nathan Taylor
Well that's all good and grand but why increase the size of the distribution when it's 
not necessary to?  Nobody wants to download something they don't necessarily need 
included.

Nathan
  - Original Message - 
  From: John Smith 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 15, 2003 12:24 PM
  Subject: Re: [PHP] Include an encoder into PHP distribution?


  Ok then, that's nice to hear.

  How about then the idea of including a reasonably good compiler/encoder into
  standard PHP distribution? For example Turck MMcache is one, gpl'd and comes
  as a php/zend extension.

  I don't think there are other free encoders as this, so there wouldn't even
  be a dispute over which to choose?

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



Re: [PHP] .html extension PHP page be interpret

2003-11-18 Thread Nathan Taylor
That's simple, just modify your Apache httpd.conf on the line where it says something 
along the lines of:

AddType application/x-httpd-php .php4 .php .php3 .inc

change it to:

AddType application/x-httpd-php .php4 .php .html .php3 .inc
  - Original Message - 
  From: BennyYim 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, November 18, 2003 5:46 AM
  Subject: [PHP] .html extension PHP page be interpret


  I using WinXP + Apache 1.3.24 + PHP 4.3.3
   
  My apache default will interpret .php extension file. (e.g.
  index.php)

  If I have a PHP page, but I want to use .html file extension (e.g. index.html).
  what I need to set to make those html extension page be interpret by server.

  I want those .html extension PHP page be interpret.

  Thank You !


  .---.
  | Message Posted by NewsgroupXplorer|
  | http://www.newsgroupxplorer.com   |
  |   |
  | Your newsreader in your browser.  |
  `---'

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



Re: [PHP] Prefilled forms

2003-11-18 Thread Nathan Taylor
This shouldn't have anything to do with your server config, but rather the forms 
themselves.

What method are you sending the form(s) with?

Nathan
  - Original Message - 
  From: b b 
  To: Jay Blanchard ; [EMAIL PROTECTED] 
  Sent: Tuesday, November 18, 2003 4:24 PM
  Subject: RE: [PHP] Prefilled forms




   The Problem again:
   I have a form, I fill it, click submit and then hit
  back. Usually in other sites I see the data that I
  attempted to submit. Forms originating from my site
  are  coming up blank.

  In respnonse to your reply:
   I am using mozilla 5 or netscape 7. Same result in
  both. However, this doesn't happen with other sites
  using the same borwser ... Actually this never
  happened with my last configuration. ONly now that I
  reinstalled apache/php and actually linux that I am
  getting this behaviour from my own server only.

   I am suspecting a php.ini setting that I have set or
  set off or an apache conf detail that is causing this.
  Bowser setting is a possibility but why then is it not
  behaving this way with other sites?




  --- Jay Blanchard
  <[EMAIL PROTECTED]> wrote:
  > [snip]
  >  I don't think you understood my question. Off
  > course
  > you have to store data in a database  or a session
  > var
  > if you want to retrieve them later on.
  > 
  >  My problem is not there. I hava a form, I click
  > submit and right after that I hit back. Usually in
  > most cases the form will be prefilled with what I
  > entered. In my case I am getting a totally blank
  > form.
  > This is only hapenning with forms from my server. 
  > [/snip]
  > 
  > This AFAIK is the expected behaviour. Once you have
  > submitted the form
  > all of the input values will be blank when you
  > return to the form unless
  > you do something to specifically reload the
  > variables into the form.
  > YMMV from OS to OS, browser to browser. There is
  > only one realiable way
  > to do it cross-platform and these were mentioned
  > above. You never
  > mentioned your server config, your browser, your OS,
  > so I am only making
  > a S.W.A.G. at it. There is nothing IIRC that you can
  > configure in the
  > php.ini, httpd.conf, or other configuration file.
  > You may have a browser
  > setting that affects this, but since we know not
  > your browser type it
  > would be hard to help you locate that.


  __
  Do you Yahoo!?
  Protect your identity with Yahoo! Mail AddressGuard
  http://antispam.yahoo.com/whatsnewfree

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



Re: [PHP] Form with browse for file to upload "ftp"

2003-11-22 Thread Nathan Taylor
There is nothing special to be done with the form itself for it to support file 
uploading aside from supply a browse field:



As for uploading it, here's some untested code:

 if(!empty($_FILES['file']['tmp_name'])) {
 $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name']));
 $destination = 'path/to/where/you/want/the/file/saved/'.$name;
 if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) {
  echo 'Successful';
 } else {
  echo 'Failed';
 }
  }
  - Original Message - 
  From: PAUL FERRIE 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 22, 2003 2:04 PM
  Subject: [PHP] Form with browse for file to upload "ftp"


  Getting bit of a regular on here :)

  I am hoping that someone can point me to a script that allows me to attach a
  file to be uploaded to a set dir.
  I have already got the form built, except for a browse file option.
  The form is part of this admin area
  http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html
  Instead of having a textfield displaying a url of the image and the admin
  having to upload it sepratly i thought that i could get the admin to upload
  the image via the form.  keeps it altogether.

  I wouldnt know were to begin adding this to the form.  i am pretty sure
  there a pre-built script that can do this.  Can someone point me to one.  i
  had a quick look but came up with very little.

  Cheers
  Paul

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



Re: [PHP] Form with browse for file to upload "ftp"

2003-11-22 Thread Nathan Taylor
There is nothing special to be done with the form itself for it to support file 
uploading aside from supply a browse field:



As for uploading it, here's some untested code:

 if(!empty($_FILES['file']['tmp_name'])) {
 $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name']));
 $destination = 'path/to/where/you/want/the/file/saved/'.$name;
 if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) {
  echo 'Successful';
 } else {
  echo 'Failed';
 }
  }
  - Original Message - 
  From: PAUL FERRIE 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 22, 2003 2:04 PM
  Subject: [PHP] Form with browse for file to upload "ftp"


  Getting bit of a regular on here :)

  I am hoping that someone can point me to a script that allows me to attach a
  file to be uploaded to a set dir.
  I have already got the form built, except for a browse file option.
  The form is part of this admin area
  http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html
  Instead of having a textfield displaying a url of the image and the admin
  having to upload it sepratly i thought that i could get the admin to upload
  the image via the form.  keeps it altogether.

  I wouldnt know were to begin adding this to the form.  i am pretty sure
  there a pre-built script that can do this.  Can someone point me to one.  i
  had a quick look but came up with very little.

  Cheers
  Paul

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



Re: [PHP] Form with browse for file to upload "ftp"

2003-11-22 Thread Nathan Taylor
Oh and also, don't forget to set: enctype="multipart/form-data" in the  tag.

Nathan
  - Original Message - 
  From: Nathan Taylor 
  To: PAUL FERRIE ; [EMAIL PROTECTED] 
  Sent: Saturday, November 22, 2003 2:20 PM
  Subject: Re: [PHP] Form with browse for file to upload "ftp"


  There is nothing special to be done with the form itself for it to support file 
uploading aside from supply a browse field:

  

  As for uploading it, here's some untested code:

   if(!empty($_FILES['file']['tmp_name'])) {
   $name = strtolower(eregi_replace('#| |\?|!', '', $_FILES['file']['name']));
   $destination = 'path/to/where/you/want/the/file/saved/'.$name;
   if(move_uploaded_file($_FILES['file']['tmp_name'], $destination)) {
echo 'Successful';
   } else {
echo 'Failed';
   }
}
- Original Message - 
From: PAUL FERRIE 
To: [EMAIL PROTECTED] 
Sent: Saturday, November 22, 2003 2:04 PM
Subject: [PHP] Form with browse for file to upload "ftp"


Getting bit of a regular on here :)

I am hoping that someone can point me to a script that allows me to attach a
file to be uploaded to a set dir.
I have already got the form built, except for a browse file option.
The form is part of this admin area
http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html
Instead of having a textfield displaying a url of the image and the admin
having to upload it sepratly i thought that i could get the admin to upload
the image via the form.  keeps it altogether.

I wouldnt know were to begin adding this to the form.  i am pretty sure
there a pre-built script that can do this.  Can someone point me to one.  i
had a quick look but came up with very little.

Cheers
Paul

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



Re: [PHP] Re: Form with browse for file to upload "ftp"

2003-11-22 Thread Nathan Taylor
Glad to be of service. =)
  - Original Message - 
  From: PAUL FERRIE 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, November 22, 2003 3:52 PM
  Subject: [PHP] Re: Form with browse for file to upload "ftp"


  Got it working :)
  thanks for the help

  Paul

  "Paul Ferrie" <[EMAIL PROTECTED]> wrote in message
  news:[EMAIL PROTECTED]
  > Getting bit of a regular on here :)
  >
  > I am hoping that someone can point me to a script that allows me to attach
  a
  > file to be uploaded to a set dir.
  > I have already got the form built, except for a browse file option.
  > The form is part of this admin area
  > http://thor.ancilenetworks.co.uk/~pferrie/vinrev/adm/myadmin.html
  > Instead of having a textfield displaying a url of the image and the admin
  > having to upload it sepratly i thought that i could get the admin to
  upload
  > the image via the form.  keeps it altogether.
  >
  > I wouldnt know were to begin adding this to the form.  i am pretty sure
  > there a pre-built script that can do this.  Can someone point me to one.
  i
  > had a quick look but came up with very little.
  >
  > Cheers
  > Paul

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



Re: [PHP] HTML email enconding

2003-11-24 Thread Nathan Taylor
There is a nice function called sendmail available in the comments on php.net/mail.  I 
use that regularly as it inserts all the necessary headers and supports multiple 
attachments.  It's well worth considering...

Nathan
  - Original Message - 
  From: Eugene Lee 
  To: [EMAIL PROTECTED] 
  Sent: Monday, November 24, 2003 5:19 AM
  Subject: Re: [PHP] HTML email enconding


  On Mon, Nov 24, 2003 at 03:33:57PM +0530, Binay wrote:
  : 
  : So does it mean that if i don't encode the message then no need of
  : specifying the Content-Transfer-Encoding??
  : And almost all mail client will interpret it correctly??

  No.  If your HTML message is guaranteed to be in the ISO-8859-1 range
  (e.g. only Latin-based languages), then you could likely get away with
  just these two headers.  But you still need to specify both of them.

  : > Content-Type: text/html; charset="ISO-8859-1"
  : > Content-Transfer-Encoding: 7bit

  You need to follow the various RFCs to generate correct messsages.  If
  you don't have time for that, I suggest you look at existing classes
  like PEAR's Mail_Mime package that does much of the work for you:

  http://pear.php.net/package/Mail_Mime

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



Re: [PHP] PHP script that fills forms ?

2003-11-26 Thread Nathan Taylor
You're not making any sense my friend. If you want to fill form field then supply them 
with a value="" value.  There's nothing more to it.
  - Original Message - 
  From: Anonymous 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, November 26, 2003 5:37 AM
  Subject: Re: [PHP] PHP script that fills forms ?


  Well, you see. I didn't mean it that way. I meant PHP to fetch a website.
  The website is password protected and you need to fill a form to access it.
  So I would like PHP to fill that form for me. Would that be possible? Are
  there any other solutions?

  "Sophie Mattoug" <[EMAIL PROTECTED]> skrev i melding
  news:[EMAIL PROTECTED]
  > Anonymous wrote:
  >
  > >I was just wondering if it's possible to get a PHP script to fill a form
  for
  > >you? You see, I'm trying to make PHP fetch a password protected website
  for
  > >me and there's a form with username and password that protects it.
  > >
  > >Can anyone help me? Perhaps give me another sollution?
  > >
  > >
  >
  > echo '";

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



Re: [PHP] Accessing .bat file from PHP

2003-11-30 Thread Nathan Taylor
I believe... that the .bat file MUST be on the server for PHP to execute it.

Nathan
  - Original Message - 
  From: Reidar Solberg 
  To: [EMAIL PROTECTED] 
  Sent: Sunday, November 30, 2003 1:10 PM
  Subject: [PHP] Accessing .bat file from PHP


  I want to start a .bat file on my local pc from my webpage -  to download
  some .txt files.
  I run PHP in my webpage - how can I make contact with the .bat file? Anyone
  tried this?

  Reidar Solberg

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



Re: [PHP] php2c

2003-12-05 Thread Nathan Taylor
Hello,

BinaryPHP is still at a dev state and is incomplete, if you're having specific 
problems try stopping by #binaryphp on freenode and talking to Daeken there regarding 
them.

Best Wishes,
Nathan
  - Original Message - 
  From: Volvo 
  To: [EMAIL PROTECTED] 
  Sent: Friday, December 05, 2003 6:33 AM
  Subject: [PHP] php2c


  Hi,

  Is there any project going on transfering the PHP code into C++?

  I found http://binaryphp.sf.net/ but when I run the convert.php on Windows
  machine I get an error as below

  C:\servers\binaryPHP>convert.php --if examples/helloworld.php --of hello

  PHP Notice:  Undefined index:  argc in C:\servers\binaryPHP\convert.php on
  line 9
  Content-type: text/html
  X-Powered-By: PHP/4.3.2

  
  Notice:  Undefined index:  argc in
  C:\servers\binaryPHP\convert.php on line 9
  Usage: convert.php --if  --of  [-v | --verbose] [-h
  | --h
  elp]
  Too Few Arguments


  any help?

  Volvo

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



Re: [PHP] run a command on a remote host

2003-12-09 Thread Nathan Taylor
When you say remote host do you mean the server executing the script or the person 
accessing it?

If you mean the latter, it is not possible.
  - Original Message - 
  From: Ivone Uribe 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, December 09, 2003 5:44 PM
  Subject: [PHP] run a command on a remote host


  How can I run a command on a remote host wiht php?

  I'm trying this line but nothing happen.
  passthru("rsh rubella
  /export/dat0/users/augur-se/bin/.upnotify -s
  1045073262-82425_net2.nextelinternational.com -u
  http://wap.peru.com -a -y D--- -i Location -n");

  I try exec and system, too

  But if I run this from the command line of my machine
  the command run rightly.

  rsh rubella /export/dat0/users/augur-se/bin/.upnotify
  -s 1045073262-82425_net2.nextelinternational.com -u
  http://wap.peru.com -a -y D--- -i Location -n

  Thanks in advance,
  Ivone



  __
  Do you Yahoo!?
  Free Pop-Up Blocker - Get it now
  http://companion.yahoo.com/

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



Re: [PHP] PHP Calendar.

2004-01-15 Thread Nathan Taylor
No, but HotScripts.com and PHPClasses.org (><) will have classes to do them.  I'm a 
fan of BosDates (can be found on HotScripts.com), but I think it might cost something 
to get it.

Cheers,
Nathan Taylor
  - Original Message - 
  From: Carles Xavier Munyoz Baldó 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, January 15, 2004 9:27 AM
  Subject: [PHP] PHP Calendar.


  Hi,
  Is there any PHP function or set of PHP files that allows me to print the 
  current month in calendar format ?

  Greetings.
  ---
  Carles Xavier Munyoz Baldó
  [EMAIL PROTECTED]
  http://www.unlimitedmail.net/
  ---

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



Re: [PHP] Debug code

2004-01-19 Thread Nathan Taylor
Aye, PHP is compiled by the executable, nothing else- what are you using?
  - Original Message - 
  From: Robin Kopetzky 
  To: PHP General 
  Sent: Monday, January 19, 2004 10:32 AM
  Subject: [PHP] Debug code


  Good morning!

  Is there any way to keep the compiler from adding 'debug code'? Example:

  if ($b_debug)
  {
  echo ...
  }

  Just trying to eliminate code bloat.

  Robin 'Sparky' Kopetzky
  Black Mesa Computers/Internet Service
  Grants, NM 87020 

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



Re: [PHP] CyberCash Libraries?

2001-01-15 Thread Nathan Cook

Nevermind, cybercash.com has an MCK (Merchant Kit) that has the libs in it.

Thx, though.
-nc
---
.:: Nathan Cook- Network/Security Admin
office:  208.343.3110   - Web Programmer
email:   [EMAIL PROTECTED] - Qmail Admin
pager:  208.387.9983   - MIS Admin
---
- Original Message - 
From: "ncook" <[EMAIL PROTECTED]>
To: "Php List" <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 10:49 AM
Subject: [PHP] CyberCash Libraries?


> Where can I get the Cybercash Libraries?
> 
> -nc
> 
> 
> -- 
> 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, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
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, e-mail: [EMAIL PROTECTED]




[PHP] BC Math

2001-01-15 Thread Nathan Cook

BC Math, Arbitrary Precision Numbers?

Can someone shed some light on these functions for me?
Thanks.
---
.:: Nathan Cook- Network/Security Admin
office:  208.343.3110   - Web Programmer
email:   [EMAIL PROTECTED] - Qmail Admin
pager:  208.387.9983   - MIS Admin
---


-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] string replace

2001-01-16 Thread Nathan Cook

You may want to try exploding on the ".":

$fooPieces = explode($foo, ".");

That way everything before the dot, is in the first piece of the array and
everything after is in the second part of the array.  However this may cause
issues if filenames will contain dots.  But if you follow an 8.3 or 8.4
character filename structure you will be fine.

.:: Nathan Cook
- Original Message -
From: "Tait Grove" <[EMAIL PROTECTED]>
To: "PHP GENERAL" <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 1:01 PM
Subject: [PHP] string replace


How can I strip everything past a certain character in a string?

i.e.:

$foo = "test.gif";

// strip past the .gif

$foo = "test";

// again

$foo2 = "test.jpeg";

// strip past the .jpeg

$foo2 = "test";


Tait



-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to keep unauthorized viewers out

2001-01-16 Thread Nathan Cook

I would put it in the subsequent include page.

if($PHP_AUTH_USER)
 {
includes();
 }
else
 {
print("You are not authorized to view this page");
 }
---
.:: Nathan Cook- Network/Security Admin
office:  208.343.3110   - Web Programmer
email:   [EMAIL PROTECTED] - Qmail Admin
pager:  208.387.9983   - MIS Admin
---
- Original Message -
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 16, 2001 5:13 PM
Subject: Re: [PHP] How to keep unauthorized viewers out


> Nathan,
>
> Thanks for your reply ...
>
> At 04:53 PM 01/16/2001 -0700, Nathan Cook wrote:
> >how do they authenticate?  VIA http or a subsequent page?
>
> HTTP authentication,using
>   Header("WWW-authenticate: basic realm=\"Business Today\"")
>
> >Whichever it is, there are variables associated with each check for those
> >variables before loading.
>
> Yes I'm using $PHP_AUTH_USER and $PHP_AUTH_PW. But I can only check for
> those within a script, not in a straight HTML page. (Although I suppose I
> could change all the page extensions to .php and put a check for these
> var's at the very top and redirect to  the login script if they are not
> present.)
>
> Alternately, I suppose I could create a session ID, following a successful
> login. I really don't want to invoke .htaccess.
>
> Miles
>
> >---
> >.:: Nathan Cook- Network/Security Admin
> >office:  208.343.3110   - Web Programmer
> >email:   [EMAIL PROTECTED] - Qmail Admin
> >pager:  208.387.9983   - MIS Admin
> >---
> >- Original Message -
> >From: "Miles Thompson" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Tuesday, January 16, 2001 4:49 PM
> >Subject: [PHP] How to keep unauthorized viewers out
> >
> >
> > > I'm using a pretty simple linking system for a subscription-based
> > > newsletter site.
> > >
> > > Stories and articles are in straight html files, reached by links from
the
> > > front page. Clicking on a link passes a story number. So the second
story
> > > on the index page would have this link: 
> > >
> > > and story.php consists of just these lines:
> > >
> > >  > > include "header.inc" ;
> > > include $storynum.".htm" ;
> > > include "footer.inc" ;
> > > ?>
> > >
> > > If someone comes in the "right way", through the index page, they will
> >have
> > > to be authenticated, then the header, article and page footer are
> >displayed.
> > >
> > > There's nothing, however, to stop someone from typing an URL like
this:
> > > http://www.somepub.ca/2.htm and seeing the article. I assume they
could
> > > also come in that way via a search engine.
> > >
> > > Any suggestions on how to stop that? Resources I should look at? I do
want
> > > to keep the stories in straight html as the editor is struggling now
with
> > > basic layout, etc.
> > >
> > > Regards - Miles Thompson
> > >
> > >
> > >
> > > --
> > > 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, e-mail:
[EMAIL PROTECTED]
> > >
> > >
>
>
>
>


-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] Ultimate Editor

2001-01-18 Thread Nathan Cook

If I may make a session download phped.com or find another editor (notepad)
and then use that in conjunction with ftp net drive (look for it on the web
somewhere), it will allow you view the ftp servers drive, copy and paste and
save directly to the server... works very nice.

.:: Nathan Cook [ [EMAIL PROTECTED] ] ::.
Systems & Network Administrator :: Programmer
phone == 208.343.3110 :: pager == 208.387.9983
- Original Message -
From: "Chris Aitken" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 5:10 PM
Subject: [PHP] Ultimate Editor


> At 06:47 PM 18/01/2001, you wrote:
>
> >What I'd like an editor to do for me is help out with how the page looks.
> >One I set up a page that looks half-way decent - even if I use stock
> >templates or style sheets - I can always plop the code in later by hand
and
> >that's no biggie. It's just that initial setting up of tables and stuff
that
> >is kind of tedious and I want to get away from that so I can concentrate
on
> >the code.
>
>
> Personally, I would love to find an editor which had colour coded code
> ability, a nice windows cut/paste/undo/redo feature, much akin to say
> Homesite, but the most important thing would be that it can simulate a
> telnet connection (or any connection for that matter) to the web server im
> working on and use it just like the current editors view/use/display the
> local hard drive. When you save a file, it instantly saves it on the
> server. Ive seen some editors which have a supposed publish option but
they
> are either very lame, or made by microsoft (nuff said).
>
> I like the ability to have a simple keystroke(s) to instantly update the
> file so I can reload it direct off the webserver and test it out. Infact,
I
> didnt mind how nedit worked when I was running my FreeBSD box at home, but
> it too couldnt allow me to work on remote files live.
>
>
>
> Chris
>
>
> --
> 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, e-mail: [EMAIL PROTECTED]
>
>


-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] Local Path of Script

2001-01-22 Thread Nathan Cook

I just do:
$LocalScript = $DOCUMENT_ROOT . $PHP_SELF;


.:: Nathan Cook [ [EMAIL PROTECTED] ] ::.
Systems & Network Administrator :: Programmer
[ phone - 208.343.3110 ][ pager - 208.387.9983 ]
- Original Message -
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 9:41 AM
Subject: [PHP] Local Path of Script


> How do I obtain the path of the local script?  Or do I have to build it
from
> the $DOCUMENT_ROOT?
>
>
> --
> 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, e-mail: [EMAIL PROTECTED]
>
>


-- 
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, e-mail: [EMAIL PROTECTED]




[PHP] easy question.

2001-01-24 Thread Nathan Cook

I have always wrote code this like:

if(($fname) && ($lname) && ($email)) 
  {  echo "test"; }

Is there an easier way to write the IF line?

Thank You

.:: Nathan Cook [ [EMAIL PROTECTED] ] ::.
Systems & Network Administrator :: Programmer
[ phone - 208.343.3110 ][ pager - 208.387.9983 ]


-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] Echo and Print

2001-01-26 Thread Nathan Cassano


As I understand it, echo is somewhat of an language construct and print is a
function.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:37 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Echo and Print


I know it is a kind of stupid question but I was trying to figure out
the difference between "Echo" and "Print" and I didn't find it...Could
anybody explain that to me??
Thank you

Felipe Lopes


MailBR - O e-mail do Brasil -- http://www.mailbr.com.br
Faça já o seu. É gratuito!!!

--
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, e-mail: [EMAIL PROTECTED]


-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] strip ^M's ??

2001-03-02 Thread Nathan Cassano

Here is a solution I can up with to solve all the CR and LF funniness coming
from different web browsers.

$input = ereg_replace("\r\n|\n|\r", "\n", $input);

-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 9:43 AM
To: PHP User Group
Subject: [PHP] strip ^M's ??


Hello,

I am making a PHP script that upload formmail into people web directory with
all the settings easily configured on a web based setup screen.  Is there a
way to have php remove all ^M (Control M) from the file before it uploads it
to the server?

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com



--
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, e-mail: [EMAIL PROTECTED]


-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] Is it odd or even??? Optimize!!!

2001-03-05 Thread Nathan Cassano

You all are a bunch of un-optimizing novices. Just do some bit banging.

i.e.

if(1 & number){
echo "$number is odd";
}else{
echo "$number is even";
}


-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 05, 2001 12:18 PM
To: PHP User Group
Subject: [PHP] Is it odd or even???


Hello,

Is there an easy way to check and see if a number is odd or even?

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
 


-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] payment

2001-03-09 Thread Nathan Cook

I haven't used opay.com.

However I was looking at using cybercash for up and coming software I am
writing.

Their website talks extensively about a merger with a 'Network 1' company
and now a buyout and a chapter 11 filing.  The buyout, or "merger" press
release says: "CyberCash Internet Payment Processing Service to Continue
without Interruption."

Is this incorrect?  When you say that it 'died', what are you referring to?

.:: Nathan Cook [ [EMAIL PROTECTED] ] ::.
PCS Edventures.com
Systems & Network Administrator :: Programmer
[ phone - 208.343.3110 ][ pager - 208.387.9983 ]
- Original Message -
From: "Rick St Jean" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 09, 2001 3:27 PM
Subject: [PHP] payment


> How to people typically integrate payment processors with PHP?
> And what processors are used most often?  I know that a number
> of people are scrambling after cybercash died.  There is a site out
> there www.opay.com that says it supports payment processors
> on any platform, anyone ever use it?
>
> Rick
> ##
> #  Rick St Jean,
> #  [EMAIL PROTECTED]
> #  President of Design Shark,
> #  http://www.designshark.com/
> #  Quick Contact:  http://www.designshark.com/messaging.ihtml
> #  Tel: 905-684-2952
> ##
>
>
> --
> 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, e-mail: [EMAIL PROTECTED]
>
>


-- 
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, e-mail: [EMAIL PROTECTED]




[PHP] HTTP Bailout

2001-03-12 Thread Nathan Cassano

When a client bails out of a http connection and apache shuts down that
thread process, is there something or a way so that php can call some sort
of destructor? My problem is if a client bails out right in the middle of a
financial transaction I need some way of canceling a pending order.

Nathan

-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] Tutorial for RegExpressions

2001-03-14 Thread Nathan Cassano


Learning to Use Regular Expressions by Example
http://www.phpbuilder.com/columns/dario19990616.php3

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 6:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Tutorial for RegExpressions


Hi !

Does someone know a good tutorial für regula-expression, like they are
used in ereg and preg ?

Martin



--
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, e-mail: [EMAIL PROTECTED]


-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] Radio Button Returns (Pleasre Read)

2001-03-16 Thread Nathan Cook

This question baffles me.  Just to clarify do you have at least two radio
buttons on this page and are they both under the same name?

It also could be if the HTML you mailed the list is the same you have in
your generated page then you may want an '=' sign between the value"index"

.:: Nathan Cook [ [EMAIL PROTECTED] ] ::.
PCS Edventures.com
Programmer :: Systems & Network Administrator
[ phone - 208.343.3110 ][ pager - 208.387.9983 ]

\"You know you\'re in big trouble when you try to escape character your
e-mail\'s\"

- Original Message -
From: "Fred" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 16, 2001 4:22 PM
Subject: [PHP] Radio Button Returns (Pleasre Read)


> this is the code:
>$page .= " value\"$info[PageID]\">";
>
> this is the html source generated:
> 
>
> and this is what $pageid returns:
> 'on'
>
> 2 questions is
> why? and how do i fix it?
>
> thanks to all who take the time to awnser :-)
> ~Fred
>
>
>
> --
> 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, e-mail: [EMAIL PROTECTED]
>
>


-- 
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, e-mail: [EMAIL PROTECTED]




RE: [PHP] Password Generator?

2001-04-18 Thread Nathan Cassano

Random Pronounceable Password Generator
This function generates random pronounceable passwords. (ie jachudru,
cupheki)

http://www.zend.com/codex.php?id=215&single=1

-Original Message-
From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 18, 2001 1:20 PM
To: PHP-General List
Subject: [PHP] Password Generator?



Is there an easy way to generate generic passwords based on
(combined) dictionary words?  (ej: take two different words and put them
together)

AMK4


-- 
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, e-mail: [EMAIL PROTECTED]




[PHP] String Type Unknown

2001-04-30 Thread Nathan Cook

I have this string:

0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f
fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f5072
6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0f252
14a0ffe40ffb803000246000a6c6f6164466163746f724900097468726573686f6c64787
03f48770800030002740005696d61676574004a3c494d47205352433d226
87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e7475726
5732f6c6162732f627269636b735f7765622e6a7067223e740004746578747402024974206973206
96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c697461746f7
220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e2074686520766
172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d65206
6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616c732
0746861742073747564656e74732077696c6c20626520646f696e672c20616e64206265206177617
265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d7320616
e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c696172697479207
769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e747320697
320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f7065642
06120736570617261746520636f7572736520666f637573696e67206f6e2074686520757365206f6
620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e2020416
c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d6520746f207
4616b652074686973206164646974696f6e616c20636f757273652e7870

And I don't know what type it is.  It is it a binary string?  Can I convert it
to text and if so, how?

Thank You,
Nathan Cook
[EMAIL PROTECTED]


-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] String Type Unknown

2001-05-02 Thread Nathan Cook

>From a field in an instantdb database (http://instantdb.enhydra.org)

Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Anuradha Ratnaweera" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: "Php List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 11:03 PM
Subject: Re: [PHP] String Type Unknown


>
> Since it contains only digits 0-9 and letters a-f, it looks like
> hexadecimal. Why don't you try to read two characters at a time and either
> convert them to binary or check their ascii values. There seem to be many
> ascii values however.
>
> Where did you get this from?
>
> Anuradha
>
> On Mon, 30 Apr 2001, Nathan Cook wrote:
>
> > I have this string:
> >
> >
0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f
> >
fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f5072
> >
6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0f252
> > 14a0ffe40ffb803000246000a6c6f6164466163746f724900097
> >
> > And I don't know what type it is.  It is it a binary string?  Can I convert
it
> > to text and if so, how?
> >
> > Thank You,
> > Nathan Cook
> > [EMAIL PROTECTED]
> >
> >
> > --
> > 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, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> 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, e-mail: [EMAIL PROTECTED]
>
>


-- 
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, e-mail: [EMAIL PROTECTED]




Re: [PHP] String Type Unknown

2001-05-02 Thread Nathan Cook

Thank you, for your help it works great!

Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Rudolf Visagie" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 4:47 AM
Subject: RE: [PHP] String Type Unknown


Nathan,

Another way to do it (but much less fun):




Read Hex dump






Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 01 May 2001 11:16
To: Rudolf Visagie
Subject: Re: [PHP] String Type Unknown


How were you able to convert that?

Thanks!
Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Rudolf Visagie" <[EMAIL PROTECTED]>
To: "Nathan Cook" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 2:53 AM
Subject: RE: [PHP] String Type Unknown


Hi Nathan,

It's a hex dump and it reads:

ÿÿúÀÿÿÿí sr java.util.Properties9ÿÿý§càÿÿÿ~ L defaultst
Ljava/util/Properties;xr java.util.Hashtableÿÿû°òR ÿÿÿäÿÿûEUR0 $`
¦ÆöDf7F÷$ -F?&W6?öÆG??@ w      t imaget Jhttp://mediabank.edventures.com/edventures/labs/bricks_web.jpg";>t
texttIt is important to emphasize that a facilitator does not need to be
an expert in the various subject areas, but should become familiar with the
projects and materials that students will be doing, and be aware of how to
get help or look up terms and answers.  In particular, familiarity with the
LEGO® elements is highly recommended.  PCS has developed a
separate course focusing on the use of the LEGO® materials.
All facilitators should schedule time to take this additional course.xp

Rudolf Visagie
QEDI

-Original Message-
From: Nathan Cook [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2001 10:31
To: Php List
Subject: [PHP] String Type Unknown


I have this string:

0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f

fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f
5072
6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0
f252
14a0ffe40ffb803000246000a6c6f6164466163746f724900097468726573686f6c6
4787
03f48770800030002740005696d61676574004a3c494d47205352433
d226
87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e747
5726
5732f6c6162732f627269636b735f7765622e6a7067223e74000474657874740202497420697
3206
96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c6974617
46f7
220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e207468652
0766
172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d6
5206
6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616
c732
0746861742073747564656e74732077696c6c20626520646f696e672c20616e6420626520617
7617
265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d732
0616
e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c69617269747
9207
769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e74732
0697
320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f706
5642
06120736570617261746520636f7572736520666f637573696e67206f6e20746865207573652
06f6
620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e202
0416
c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d6520746
f207
4616b652074686973206164646974696f6e616c20636f757273652e7870

And I don't know what type it is.  It is it a binary string?  Can I convert
it
to text and if so, how?

Thank You,
Nathan Cook
[EMAIL PROTECTED]


--
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, e-mail: [EMAIL PROTECTED]




-- 
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, e-mail: [EMAIL PROTECTED]




  1   2   3   4   5   6   7   8   9   10   >