Ben Chivers | 1 Nov 2002 01:26

String to Ascii

Hi,

I'm wanting to change a character string from text into ascii code.

I tried using the function:

ebcdic2ascii()

only to find out that it isn't supported with the latest versions of php,
only version 3.

I would appreciate any help from anyone with this topic.

--

Many Regards,
Ben Chivers
Super Sites Pro

Get reliable and affordable web hosting from only $2.91pm at Super Hosts
Pro - www.superhostspro.com

--

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

suman | 1 Nov 2002 05:00
Picon

problem with postgres integration

Hi all
i'm having a strange problem while compiling php 4.2.3
i compiled php with these options

Configure Command './configure' '--with-mysql=/usr/local/mysql/' 
'--with-apxs=/usr/local/apache/bin/apxs' '--with-openssl=/usr/local/ssl/' 
'--with-pear' '--with-gd' '--with-pqsql=/usr/local/pgsql/' '--with-png' 
'--with-jpeg-dir=/usr/' '--with-ttf'

but i see no pgsql configuration
Also i see no libpng congiguration in gd table i see only jpeg configuration.I 
was trying to use jpgraph so i did all this there were no errors while 
compiling the code.so plz help me

am i missing something

thanks in advance

suman

--

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

PHP List | 1 Nov 2002 01:00
Favicon

Re: How printing the name and value of a variable ?

Why?
echo "THE VARIABLE ".(please help me right here)." EQUALS ".$tigidizougou;

Obviously the variables name is tigidizougou, so just do this:

echo "THE VARIABLE  tigidizougou EQUALS ".$tigidizougou;

Or am I missing something here?

> Theoriquement it is not possible, because you cannot use any variable
since
> you don't know its name-
>
> But you can cope something with get_defined_vars() in which you set every
> variable without distinction into an array- and after you select the
> variable you need using some criterias.
>
> like this
> $array = get_defined_vars() ;
> foreach ($array as $key=>$value)
> if (ereg("EREG_CRITERIA",$key))  echo "La variable $KEY est egale a
$value"
> ;
>
> Elsewhere if you know the name of the variable you would like to use
> do simply like this:
>
> $tigidizougou = 12;
> echo "THE VARIABLE tigidizougou EQUALS ".$tigidizougou;
>
(Continue reading)

rija | 1 Nov 2002 01:08

Re: rename()

$_FILES['userfile']['name']
$_FILES['userfile']['type']
$_FILES['userfile']['size']
$_FILES['userfile']['tmp_name']

First once you upload file from browser using <form ...><input type=file
name=userfile>, the filename is automatically renamed by another one and put
down to the upload_tmp_dir and after you move or copy it into your
destination directory.

move_uploaded_file($_FILES['userfile'], string destination) or Copy(string
filename, string destination) rename automatically the picture name to
string destination, and you can set the destination's file extension using
$_FILES['userfile']['type'] or $_FILES['userfile']['name'] using php
function like eregi() for example-

----- Original Message -----
From: "Edward Peloke" <epeloke <at> echoman.com>
To: <php-general <at> lists.php.net>
Sent: Friday, November 01, 2002 9:25 AM
Subject: [PHP] rename()

> I am trying to allow the user to upload pictures.  What is the best way to
> rename them?  If I use the rename function, I have to upload the pictures
to
> the same place as the script and then move it.  ALso, if I am not sure of
> the extension, how can I simply rename it?  Can I do multiple files at
once?
>
> Thanks,
(Continue reading)

Rasmus Lerdorf | 1 Nov 2002 01:02
Picon

Re: str_replace

Folks, read the docs please.  You can simply pass an array directly to
str_replace() and do this in a single str_replace() call.

-Rasmus

On Thu, 31 Oct 2002, Jonathan Sharp wrote:

> $del = array(' ', "'", '\\', '/'...etc);
> foreach ( $del AS $d )
> {
>    $file = str_replace($d, '', $file);
> }
>
> -js
>
>
> rick wrote:
> > How could this be written better? Is there a way to do it all in 1 line?
> >
> > $file = str_replace(" ", "", "$file");
> > $file = str_replace("'", "", "$file");
> > $file = str_replace("\\", "", "$file");
> > $file = str_replace("/", "", "$file");
> > $file = str_replace(":", "", "$file");
> > $file = str_replace("+", "", "$file");
> > $file = str_replace("&", "", "$file");
> > $file = str_replace("=", "", "$file");
> > $file = str_replace(" <at> ", "", "$file");
> > $file = str_replace("%", "", "$file");
> > $file = str_replace("^", "", "$file");
(Continue reading)

rolf vreijdenberger | 1 Nov 2002 01:04
Picon
Favicon

storing inc.php outside doc root/security/includes

this is how it is done:

include ($_SERVER['DOCUMENT_ROOT'].'/../sensitivedata.inc.php');

explanation:
suppose i have a file:
www.mydomain.com/file.php
on the server it could be :
 /home/sites/site168/web/file.php
this file wants to include a file with sensitive data, (or just download
some other files ) that should not be in the root (accessible via the web)
so I store this files in this directory, one higher than the doc root
/home/sites/site168/
like this
/home/sites/site168/sensitivedata.inc.php
it is now inaccesible via the web in a direct way, but not indirectly,
through other php scripts.

you include it in the way described above:
include ($_SERVER['DOCUMENT_ROOT'].'/../sensitivedata.inc.php');
$_SERVER['DOCUMENT_ROOT']
quote php manual "The document root directory under which the current script
is executing, as defined in the server's configuration file."

hope to have helped you all

--

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

(Continue reading)

Stephen | 1 Nov 2002 01:16
Picon

Invitation

Hello,

I know this is completely off topic but why not take a break from all your PHP work for a minute? Could some of
you please come to a chat I have running as a halloween party. Very few people are showing up. It's here:
http://www.melchior.us/chat 

Thanks!

Thanks,
Stephen Craton
http://www.melchior.us

"Life is a gift from God. Wasting it is like destroying your favorite item you received from the person you
love most." -- www.melchior.us
Greg | 1 Nov 2002 01:28
Picon
Favicon

Hashing in PHP

Hi, is there an easy way to get the lanman and md4 hash of a string in PHP?
I know there's a md5() function, but can't find anything else.  Thanks!!
-Greg
--

--

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

Monty | 1 Nov 2002 02:00
Picon
Favicon

Rearranging Order of Photos

Hi, I need to write a script that re-organizes the order of photos that
appear in an online photo gallery. I'm not sure if I can do this completely
with PHP or if I need to incorporate Javascript as well, but, I was hoping
someone here might have or know of a site that has some sample scripts that
allow someone to re-order photos displayed in a thumbnail gallery. I'm
having a hard to figuring out the best fool-proof way to accomplish this
with PHP alone.

Thanks!

Monty

--

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

Justin French | 1 Nov 2002 03:45
Picon
Gravatar

Re: Re: counting clicks on a flash ad

Hi

Looks to me like you've named your directory:
/phpadsnew/ 

And looks to me like it's look for:
/phpAdsNew/

Perhaps try that simple change and see what happens?

Justin

--

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


Gmane