Re: [PHP] nimda, etc.

2001-09-22 Thread Alexander Skwar

So sprach »Gaylen Fraley« am 2001-09-21 um 18:10:58 -0500 :
> Are you sure about that?  I am trying his script and I just had an "attack"
> and I watched the traffic through my firewall software.  It dropped off
> immediately, i.e. showed no activity.  I was expecting to see somekind of a

Sure, but you've got two Apache/PHP processes running for the sleep
time.  Now, imagine that 10,000 Nimda accesses happen at the same time.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 20 hours 7 minutes

--
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] DNS Checking and lookup

2001-09-22 Thread Chris Sacks

Hi,

Is there anyway I can use PHP to find out all the information in a DNS
Zonefile on a DNS server, in win2k, if you go to a dos prompt, and do the
following

nslookup 
server 
ls -d 



you will get loads of information on that domain name, like

SOA Records, A records, MX records, CNAME records, serial number, NS
records, basically, the zone file.

I need to be able to do this using PHP and would really appreciate some
help, maybe a pointer in the direction...


Please help,


Christian Sacks
please reply to me and the newsgroup.
Thanks
[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] file problem

2001-09-22 Thread Nikola Weber

Hi !

Thanks for the quick reply last time :)
I stucked with the following :I made a log file, but when I open it in "a+" mode, the 
pointer is set on the end of file, in the same line. Is there anything like  in 
html, 
or a command that puts a pointer in the new line ?
One more question :
Is it possible, and how, to replace radio buttons or a submit button with grafics ? 
I'd 
like to make my forms look a little different from the regular ones :)

Thanks
Nikola




-- 
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] Re: DNS Checking and lookup

2001-09-22 Thread CC Zona

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Chris Sacks) wrote:

> Is there anyway I can use PHP to find out all the information in a DNS
> Zonefile on a DNS server, in win2k, if you go to a dos prompt, and do the
> following
> 
> nslookup 
> server 
> ls -d 

See .  If 
backticks don't work on Wintel, note the "see also" refs on that page, as 
well as the the many useful functions in the "network" chapter, including 
.

-- 
CC

-- 
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] file problem

2001-09-22 Thread Niklas Lampen

You might mean \n.

Line:
$str = "This\nis a\nsample"

would output:
This
is a
sample


Did it help?


Niklas

-Original Message-
From: Nikola Weber [mailto:[EMAIL PROTECTED]]
Sent: 22. syyskuuta 2001 0:35
To: php forum
Subject: [PHP] file problem


Hi !

Thanks for the quick reply last time :)
I stucked with the following :I made a log file, but when I open it in "a+"
mode, the
pointer is set on the end of file, in the same line. Is there anything like
 in html,
or a command that puts a pointer in the new line ?
One more question :
Is it possible, and how, to replace radio buttons or a submit button with
grafics ? I'd
like to make my forms look a little different from the regular ones :)

Thanks
Nikola




--
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] Any Free Web Hosts that still support the mail( ) function out there?

2001-09-22 Thread Meir Kriheli

On Friday 21 September 2001 23:51, Salty Marine wrote:
> Greetings to Felix and All:
>
> I must agree that http://coolfreepages.com/ is a really good free hosting
> service that supports PHP.  However, soon as you use mail( ), it generates
> an error message:
> Fatal error: Call to undefined function: mail() in ...
>
> Regards,
> Salty

You can use some SMTP class to send mail without the mail() function if you 
have a mail account to use. You can search for it on 

http://phpclasses.upperdesign.com

And the SMTP class is found at

http://phpclasses.upperdesign.com/browse.html/package/14
-- 
Meir Kriheli


> -Original Message-
> From: Felix [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 4:58 PM
> To: Salty Marine; [EMAIL PROTECTED]
> Subject: Re: [PHP] Any Free Web Hosts that still support the mail( )
> function out there?
>
>
> Try coolfreepages.com
>
> Felix
> - Original Message -
> From: "Salty Marine" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 21, 2001 2:20 PM
> Subject: [PHP] Any Free Web Hosts that still support the mail( ) function
> out there?
>
> > Greetings to You:
> >
> > Any Free Web Hosts that still support the mail( ) function out there?
> >
> > Regards,
> > Salty

-- 
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] Quickie

2001-09-22 Thread Niklas Lampen

Read chapter: LXXVIII. Session handling functions


Niklas

-Original Message-
From: Peter [mailto:[EMAIL PROTECTED]]
Sent: 22. syyskuuta 2001 8:19
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Quickie


Hi,

I am trying to redirect the user to another page after user authentication
and using sessions.

I was wondering how do you redirect to another page and then at the same
use pass the session ID over to that other page.

Thanks.

Peter

On Fri, 21 Sep 2001, [iso-8859-1] Stig-Ørjan Smelror wrote:

> > If nothing is beeing sent to output on the page then use header() else
> > you need to use javascript.
> >
> >
> > Niklas
> >
>
> 
> if headers are sent.
>
> Use header( "Location: file.php" ), as noted earlier, if no headers are
sent.
>
>
>
>


--
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] Cannot add header information - headers already sent by

2001-09-22 Thread Tom Nickels

Hi everybody!

I installed php 4.06 on Win NT, IIS 4. Before I updated php 4.00 with 4.06
my scripts were running fine. Since the update I am getting always the
follwoing error:

Warning: Cannot add header information - headers already sent by (output
started at lang/dt/variables.php:321) in vote_submit.php on line
34

Line 34 of vote_submit.php is:

header("Location: ".$source."?status=9&errormessage=$errormessage");

Any idea, why this is after update not working anymore? Thanks for help

Tom




-- 
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] Cannot add header information - headers already sent by

2001-09-22 Thread Tom Nickels

Hi everybody!

I installed php 4.06 on Win NT, IIS 4. Before I updated php 4.00 with 4.06 my scripts 
were running fine. Since the update I am getting always the follwoing error:

Warning: Cannot add header information - headers already sent by (output started at 
lang/dt/variables.php:321) in vote_submit.php on line 34

Line 34 is:

header("Location: ".$source."?status=9&errormessage=$errormessage");  

Any idea, why this is after update not working anymore? Thanks for help

Tom




RE: [PHP] Cannot add header information - headers already sent by

2001-09-22 Thread Niklas Lampen

Output has started at variables.php on line 321.


Niklas


-Original Message-
From: Tom Nickels [mailto:[EMAIL PROTECTED]]
Sent: 22. syyskuuta 2001 13:20
To: [EMAIL PROTECTED]
Subject: [PHP] Cannot add header information - headers already sent by


Hi everybody!

I installed php 4.06 on Win NT, IIS 4. Before I updated php 4.00 with 4.06
my scripts were running fine. Since the update I am getting always the
follwoing error:

Warning: Cannot add header information - headers already sent by (output
started at lang/dt/variables.php:321) in vote_submit.php on line
34

Line 34 is:

header("Location: ".$source."?status=9&errormessage=$errormessage");

Any idea, why this is after update not working anymore? Thanks for help

Tom



-- 
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] Cannot add header information - headers already sent by

2001-09-22 Thread Alexander Skwar

So sprach »Tom Nickels« am 2001-09-22 um 12:01:23 +0200 :
> Warning: Cannot add header information - headers already sent by (output
> started at lang/dt/variables.php:321) in vote_submit.php on line
> 34
> 
> Line 34 of vote_submit.php is:
> 
> header("Location: ".$source."?status=9&errormessage=$errormessage");
> 
> Any idea, why this is after update not working anymore? Thanks for help

Well, because in line 321 of variables.php, there's something printed.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 2 days 22 hours 55 minutes

--
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] Re: event cache management (no, not code cache) -- W32/Nimda filter

2001-09-22 Thread Sean Straw / PSE

At 23:13 2001-09-21 -0500, Richard Lynch wrote:
>You are going to spend a *LOT* of time re-doing the work that went into SQL
>db that you have eliminated...  Re-consider.

I wanted to make the module independant of an SQL service so that it could 
reach a wider audience by having fewer system requirements.

>Under LINUX, so long as your data is less than 4K (?),
>fopen(...,'a')/fwrite()/fclose() is atomic.  So if you are just dumping out
>IP+timestamp and even some minimal data, you are set.

I'm considering going binary with the data, which means about 12 bytes per 
record, and makes them fixed length.  I can "purge" an item from the cache 
by overwriting the fields as allzero.  Problem is efficiently reading and 
writing the binary data between an array and the file.  Seems I'm going to 
spend more time massaging the data (either to convert it to/from binary 
form, or to split it into two arrays), than actually processing it.

>If you are *not* using LINUX, your other option is, in fact, to flock() the
>file.  You open it for reading, flock() the handle, fopen()

Yes, I'm well aware of the need to file lock.  My concerns lie within 
having to load the cache db, scan it for a match, deal with updating it as 
necessary, and whatnot in a modular method -- if I open and close the file 
between the lookup and update functions, some other process may update the 
file with the very same IP that I'm dealing with now.  So I've really got 
to open it and keep it open (and locked) until I've completed all my 
determination and updating.  Bugger.

>You should also use http://php.net/register_shutdown_function to be sure you
>never leave a file flock'ed if PHP pukes or something.

Good pointer.

>Perhaps even a cron job to release any flocks older than XXX time somehow...

Hmm.  This sounds like something PHP should get a new function for: perhaps 
when a lock is established, an expire could be set by the locking function, 
and sometime later, when another PHP process attempts to open the file, PHP 
would realize it is a stale lock (as defined by the registered lock 
expiration), and remove it...  I'm not on PHP-Dev though.

>Even *with* LINUX, at some point, you are going to want to shrink the file
>so it doesn't grow to monster proportions, but you only want to throw away
>the really old entries...

What I was thinking is that whenever a lookup was performed and resulted in 
an expired entry, if the expired entry was older than say, 1/2 the expire 
time, we'd take the opportunity right now to clean up the file.

>You see, there's just all sorts of nasty things you need to worry about if
>you go this route, and you really were better off with SQL where it's all
>taken care of...  Re-consider again. :-)

The design consideration here is that an SQL dependance means anyone who 
might want to use the module (this is for dealing with CodeRed and 
W32/Nimda and no doubt the next IIS worm that strikes) must do SQL setup 
for a new database, etc.

oh, and after verifying that the whois protocol is indeed as trivial as I 
thought is was, I've dealt with that - so at the moment, my script isn't 
dependant upon any external utilities (obviously, support for updating a 
firewall would require an external script (fired up from cron), but that 
isn't required unless you're going to actually enable the firewalling 
capability, and it still isn't something that is exec'd from the PHP script).

---
  Please DO NOT carbon me on list replies.  I'll get my copy from the list.

  Sean B. Straw / Professional Software Engineering
  Post Box 2395 / San Rafael, CA  94912-2395


-- 
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] Search in Progress

2001-09-22 Thread Alexis Antonakis

Hi,

I am developing a simple site, in PHP4, which has three frames on it.

The first gives you the search options and the second two, the results.

What I was wondering was, while the database is being searched, is it
possible to display some text in the 'results' frame stating that the search
is in progress?


I also have another site which I would like do this on, however this one,
rather than using frames, uses tables, and it is only when the entire set of
data for each table has been retrieved that the page is actually displayed.

Any suggestions would be most appreciated
Alexis


-- 
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] Any Free Web Hosts that still support the mail( ) function out there?

2001-09-22 Thread hassan el forkani

hi
try this one
http://www.f2s.com , free space , no ads, most php features supported 
(including mail)
regards

At 11:44 22/09/01, Meir Kriheli wrote:
>On Friday 21 September 2001 23:51, Salty Marine wrote:
> > Greetings to Felix and All:
> >
> > I must agree that http://coolfreepages.com/ is a really good free hosting
> > service that supports PHP.  However, soon as you use mail( ), it generates
> > an error message:
> > Fatal error: Call to undefined function: mail() in ...
> >
> > Regards,
> > Salty
>
>You can use some SMTP class to send mail without the mail() function if you
>have a mail account to use. You can search for it on
>
>http://phpclasses.upperdesign.com
>
>And the SMTP class is found at
>
>http://phpclasses.upperdesign.com/browse.html/package/14
>--
>Meir Kriheli
>
>
> > -Original Message-
> > From: Felix [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, September 21, 2001 4:58 PM
> > To: Salty Marine; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Any Free Web Hosts that still support the mail( )
> > function out there?
> >
> >
> > Try coolfreepages.com
> >
> > Felix
> > - Original Message -
> > From: "Salty Marine" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, September 21, 2001 2:20 PM
> > Subject: [PHP] Any Free Web Hosts that still support the mail( ) function
> > out there?
> >
> > > Greetings to You:
> > >
> > > Any Free Web Hosts that still support the mail( ) function out there?
> > >
> > > Regards,
> > > Salty
>
>--
>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] emails with attachements

2001-09-22 Thread Radek Krejca

> > i want to send emails with attachements... can I modify the
> > mail()-function
> > or how can I perform this?
> > please email me - thank you!
>
> There's a class available here which will do it:
>
> http://www.heyes-computing.net

or use function IMAP_Mail_Compose(), in the manual is very good description

Radek

>
> --
> Richard Heyes
> "I know not with what weapons World War III will be fought, but
> World War IV
> will be fought with sticks and stones." - Albert Einstein
---
Bc. Radek Krejča
www: www.ceskedomeny.cz
e-mail: [EMAIL PROTECTED]
tel: +42 0608 / 470 980
---


-- 
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] Problem with GD version 1.8.4

2001-09-22 Thread Radek Krejča

Hi,
I try compile gd-lib in version 1.8.4 on OpenBSD. This operation caused
error, but with version 1.8.3 was all OK.
Do you have some expirience with this problem? How to compile PHP 4.0.6 wiht
gd-1.8.4
Thaks
Radek

---
Bc. Radek Krejča
www: www.ceskedomeny.cz
e-mail: [EMAIL PROTECTED]
tel: +42 0608 / 470 980
---


-- 
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] Re: [PHP-DEV] Re: fopen, fread

2001-09-22 Thread Simon Roberts

Check the value of filesize($fileName).  It's probably not working - either
because PHP doesn't support it with URLs (likely) or that it's can't get the
length from the webserver (less likely).

PS: don't cross-post this sort of message to php-dev. That's for people
developing PHP, not developing *in* PHP.

- Original Message -
From: "CC Zona" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 4:32 PM
Subject: [PHP-DEV] Re: fopen, fread


> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Dries Plessers) wrote:
>
> > Can anybody tell me what is wrong.  $file contains nothing ?
>
> > $fileName="http://www.proxis.com";;
> > $fp=fopen($fileName, "r");
> > $file=fread($fp, filesize($fileName));
> > fclose($fp);
> > print("$file");
>
> Not a good idea to just assume that every fopen will be successful (and
> therefore go ahead with the read) or that every fread will be successful
> (and therefore go ahead with the print).  Throw some error checking in
> there, and PHP will likely tell you where the code is failing and why.
>
> --
> CC
>
> --
> PHP Development Mailing List 
> 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] How to find the browser type in HTML or PERL??

2001-09-22 Thread Urb LeJeune

Look at $HTTP_USER_AGENT.

Urb


> Anybody know how to code in HTML or perl to find the browser
>say
>
>if 
>{
>do this
>}
>else if 
>{
> do this
>}
>
>Thanks and regards
>-Balaji
>
>
>--
>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] How do they do that.

2001-09-22 Thread Urb LeJeune

This is sharp.

http://php.net/fopen

actually bring up:

http://www.php.net/manual/en/function.fopen.php

Is there any documentation on how they do that?

Urb


-- 
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 do they do that.

2001-09-22 Thread Alexander Skwar

So sprach »Urb LeJeune« am 2001-09-22 um 10:10:21 -0400 :
> Is there any documentation on how they do that?

I suppose, they're using Apache's mod_rewrite which transforms the URL
(php.net/fopen) to the search form
(manual-lookup.php?lang=en&function=fopen) if the part after the / is
not otherwise known.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 2 hours 23 minutes

--
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] User's editting profiles

2001-09-22 Thread Kath

I have some user profiles and I'd like them to be able to update them as they see fit 
(Change their email, password etc etc).

However, their options are rather long and instead of having these turkeys have to 
type in stuff into 8 form fields, I'd like to display the current data in those 
fields and then let them just change what needs to be done.

What is the best way to do this?

My only problem is propogating all their data through the HTML form (I can manage 
doing one or two fields, but doing 15 is rather not fun) from the database (two 
different tables too, including checkboxes).

- k



[PHP] Search in Progress

2001-09-22 Thread Alexis Antonakis

Hi,

I am developing a simple site, in PHP4, which has three frames on it.

The first gives you the search options and the second two, the results.

What I was wondering was, while the database is being searched, is it
possible to display some text in the 'results' frame stating that the search
is in progress?


I also have another site which I would like do this on, however this one,
rather than using frames, uses tables, and it is only when the entire set of
data for each table has been retrieved that the page is actually displayed.

Any suggestions would be most appreciated
Alexis



-- 
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] Checking if session has been started

2001-09-22 Thread Alexander Skwar

Hi

I need to run some code if a session has been started.  However, to do
this, I need to figure out IF the session has been started at all.

How can I do this?

Is checking for the count of elements in HTTP_SESSION_VARS the only
reliable way of doing this?  Like so?



Thanks,

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 3 hours 9 minutes

--
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] Re: Checking if session has been started

2001-09-22 Thread Gaylen Fraley

Why not populate a session variable, in the page that starts the session,
like :

  session_start();
  session_register("valid_session");
  $valid_session = true;

Then in the page that you need to check, like:

if ($session_valid) {
// Do something since a session is already running
}

--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com
PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts

"Alexander Skwar" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi

I need to run some code if a session has been started.  However, to do
this, I need to figure out IF the session has been started at all.

How can I do this?

Is checking for the count of elements in HTTP_SESSION_VARS the only
reliable way of doing this?  Like so?



Thanks,

Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 3 hours 9 minutes



-- 
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] Re: Checking if session has been started

2001-09-22 Thread Fredrik Arild Takle

  session_start();
  $valid_session = true;
  session_register("valid_session");

OR SOMETHING LIKE THIS?

 if (session_is_registered($valid_session)) {

  // Do something?!

  }

"Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Why not populate a session variable, in the page that starts the session,
> like :
>
>   session_start();
>   session_register("valid_session");
>   $valid_session = true;
>
> Then in the page that you need to check, like:
>
> if ($session_valid) {
> // Do something since a session is already running
> }
>
> --
> Gaylen
> [EMAIL PROTECTED]
> http://www.gaylenandmargie.com
> PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts
>
> "Alexander Skwar" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi
>
> I need to run some code if a session has been started.  However, to do
> this, I need to figure out IF the session has been started at all.
>
> How can I do this?
>
> Is checking for the count of elements in HTTP_SESSION_VARS the only
> reliable way of doing this?  Like so?
>
>  if (0 < count($HTTP_SESSION_VARS)){
> // Do something since a session is already running
> }
> ?>
>
> Thanks,
>
> Alexander Skwar
> --
> How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
> Homepage: http://www.digitalprojects.com   |   http://www.iso-top.de
>iso-top.de - Die günstige Art an Linux Distributionen zu kommen
> Uptime: 3 days 3 hours 9 minutes
>
>



-- 
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] Re: Checking if session has been started

2001-09-22 Thread Alexander Skwar

So sprach »Fredrik Arild Takle« am 2001-09-22 um 18:00:37 +0200 :
>   session_register("valid_session");
> 
> OR SOMETHING LIKE THIS?
> 
>  if (session_is_registered($valid_session)) {

Yep, that seems better.

Thanks to both of you!

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 4 hours 10 minutes

--
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] Script for a private mail system

2001-09-22 Thread Tom Nickels

Hi,

does anybody knows or have a php script for a private mail system within one website 
(mailboxes for sending private messages in a dating site)

Thanks

Tom



[PHP] Re: Script for a private mail system

2001-09-22 Thread Gaylen Fraley

Try http://www.hotscripts.com/PHP/Scripts_and_Programs/Email_Systems/ .

--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com
PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts

"Tom Nickels" <[EMAIL PROTECTED]> wrote in message
005401c14383$59de4440$149696c8@ws10">news:005401c14383$59de4440$149696c8@ws10...
Hi,

does anybody knows or have a php script for a private mail system within one
website (mailboxes for sending private messages in a dating site)

Thanks

Tom




-- 
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] Search in Progress

2001-09-22 Thread rm

to my knowledge what you're talking about is done
through html layers and javascript...I've seen it done
at other siteshttp://www.anywho.com/rl.html  uses
this process.

rm





--- Alexis Antonakis <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am developing a simple site, in PHP4, which has
> three frames on it.
> 
> The first gives you the search options and the
> second two, the results.
> 
> What I was wondering was, while the database is
> being searched, is it
> possible to display some text in the 'results' frame
> stating that the search
> is in progress?
> 
> 
> I also have another site which I would like do this
> on, however this one,
> rather than using frames, uses tables, and it is
> only when the entire set of
> data for each table has been retrieved that the page
> is actually displayed.
> 
> Any suggestions would be most appreciated
> Alexis
> 
> 
> -- 
> 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]
> 


__
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.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] Why this error to this newsgroup?

2001-09-22 Thread Gaylen Fraley

Every message that I post to news.php.net gets posted, but I receive this
email:

This is the Postfix program at host mail.aaz-netmarketing.com.

I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.

For further assistance, please send mail to 

If you do so, please include this problem report. You can
delete your own text from the message returned below.

The Postfix program

<[EMAIL PROTECTED]>: can't create user output file. Command
output: procmail: Error while writing to "/var/spool/mail/dtt"
--

This just started, I believe, this week.  Is there some kind of an
auto-responder that isn't working correctly?


--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com
PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts




-- 
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] Re: fopen, fread

2001-09-22 Thread Philip Olson

Yeah, filesize() does not work with urls.  Suggested file() and implode()
earlier for this task and didn't mention fgets() as it may be appropriate
here as well.

  http://www.php.net/fgets
  http://www.php.net/file

Both manual entries have examples that do exactly what you want, "Put a
url contents into a string." fgets() is nice because you don't have to
gets the entire file, sticking a break; in there during a "match" can be
uber cool :-)

If this is being done locally then of course don't go through http:// ...

Regards,
Philip Olson



On Sun, 23 Sep 2001, Simon Roberts wrote:

> Check the value of filesize($fileName).  It's probably not working - either
> because PHP doesn't support it with URLs (likely) or that it's can't get the
> length from the webserver (less likely).
> 
> PS: don't cross-post this sort of message to php-dev. That's for people
> developing PHP, not developing *in* PHP.
> 
> - Original Message -
> From: "CC Zona" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Saturday, September 22, 2001 4:32 PM
> Subject: [PHP-DEV] Re: fopen, fread
> 
> 
> > In article <[EMAIL PROTECTED]>,
> >  [EMAIL PROTECTED] (Dries Plessers) wrote:
> >
> > > Can anybody tell me what is wrong.  $file contains nothing ?
> >
> > > $fileName="http://www.proxis.com";;
> > > $fp=fopen($fileName, "r");
> > > $file=fread($fp, filesize($fileName));
> > > fclose($fp);
> > > print("$file");
> >
> > Not a good idea to just assume that every fopen will be successful (and
> > therefore go ahead with the read) or that every fread will be successful
> > (and therefore go ahead with the print).  Throw some error checking in
> > there, and PHP will likely tell you where the code is failing and why.
> >
> > --
> > CC
> >
> > --
> > PHP Development Mailing List 
> > 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] Search in Progress

2001-09-22 Thread Gaylen Fraley

You don't need layers.  Just have a js routine that sends 2 different
location statements, i.e.


parent.resultsframe.location =
"javascript:'document.write(loading...');";
// then start your search code here


--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com
PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts

"Rm" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> to my knowledge what you're talking about is done
> through html layers and javascript...I've seen it done
> at other siteshttp://www.anywho.com/rl.html  uses
> this process.
>
> rm
>
>
>
>
>
> --- Alexis Antonakis <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am developing a simple site, in PHP4, which has
> > three frames on it.
> >
> > The first gives you the search options and the
> > second two, the results.
> >
> > What I was wondering was, while the database is
> > being searched, is it
> > possible to display some text in the 'results' frame
> > stating that the search
> > is in progress?
> >
> >
> > I also have another site which I would like do this
> > on, however this one,
> > rather than using frames, uses tables, and it is
> > only when the entire set of
> > data for each table has been retrieved that the page
> > is actually displayed.
> >
> > Any suggestions would be most appreciated
> > Alexis
> >
> >
> > --
> > 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]
> >
>
>
> __
> Do You Yahoo!?
> Get email alerts & NEW webcam video instant messaging with Yahoo!
Messenger. http://im.yahoo.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] Why this error to this newsgroup?

2001-09-22 Thread hvm

Hi I have the same and I don't know if some one even get my questions, I
never get a response.
Maybe the questions are to difficult.

Yours Hans.


- Original Message -
From: "Gaylen Fraley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 6:34 PM
Subject: [PHP] Why this error to this newsgroup?


> Every message that I post to news.php.net gets posted, but I receive this
> email:
> 
> This is the Postfix program at host mail.aaz-netmarketing.com.
>
> I'm sorry to have to inform you that the message returned
> below could not be delivered to one or more destinations.
>
> For further assistance, please send mail to 
>
> If you do so, please include this problem report. You can
> delete your own text from the message returned below.
>
> The Postfix program
>
> <[EMAIL PROTECTED]>: can't create user output file.
Command
> output: procmail: Error while writing to "/var/spool/mail/dtt"
> --
>
> This just started, I believe, this week.  Is there some kind of an
> auto-responder that isn't working correctly?
>
>
> --
> Gaylen
> [EMAIL PROTECTED]
> http://www.gaylenandmargie.com
> PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts
>
>
>
>
> --
> 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] Search in Progress

2001-09-22 Thread hvm

Hi Alexis,

I have the same sort of settings but it is for me very difficult to get the
information from the find input field in to the session variables.
Do you have a solution how to do this?
I have no solution to your problem but it is for me also interesting to see
if someone comes with a solution.

Yours Hans.

- Original Message -
From: "Alexis Antonakis" <[EMAIL PROTECTED]>
To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 5:02 PM
Subject: [PHP] Search in Progress


> Hi,
>
> I am developing a simple site, in PHP4, which has three frames on it.
>
> The first gives you the search options and the second two, the results.
>
> What I was wondering was, while the database is being searched, is it
> possible to display some text in the 'results' frame stating that the
search
> is in progress?
>
>
> I also have another site which I would like do this on, however this one,
> rather than using frames, uses tables, and it is only when the entire set
of
> data for each table has been retrieved that the page is actually
displayed.
>
> Any suggestions would be most appreciated
> Alexis
>
>
>
> --
> 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] error message

2001-09-22 Thread Peter

Hi,

I was wondering does anyone know what this particular error message means:

Warning: Use of undefined constant submit - assumed 'submit' in
/usr/local/apache/htdocs/mm2/mymarket/privatedirectory/db/newthread.php on
line 110

But I already defined submit button as shown in the php script here:



But for some reason when it goes to line 110 as shown just below, it says
that it is undefined:

if(!submit) {

if(validate_input($name, $email, $subject, $message) == 0) { 


What should I check for?

Thanks.

Peter 



-- 
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] Re: event cache management (no, not code cache) -- W32/Nimda filter

2001-09-22 Thread Michael Kimsal

Sean Straw / PSE wrote:

>
> The design consideration here is that an SQL dependance means anyone 
> who might want to use the module (this is for dealing with CodeRed and 
> W32/Nimda and no doubt the next IIS worm that strikes) must do SQL 
> setup for a new database, etc.
>
> oh, and after verifying that the whois protocol is indeed as trivial 
> as I thought is was, I've dealt with that - so at the moment, my 
> script isn't dependant upon any external utilities (obviously, support 
> for updating a firewall would require an external script (fired up 
> from cron), but that isn't required unless you're going to actually 
> enable the firewalling capability, and it still isn't something that 
> is exec'd from the PHP script).

Just to throw my two cents in, I'd agree with Richard that SQL would 
make this much easier.  Yes, you'd need to set up a db or table for the 
SQL stuff, but it's going to be much more scaleable, and my hunch is 
most people that are concerned enough about nimda and future 
worms/viruses/etc are either going to have some SQL database at their 
disposal, or will expend the time/effort to get one.

Also, consider those with multiple web servers - each of them logging 
distinct data would be overkill - a separate DB machine would take the 
load off them (network only, no disk) and keep a centralized copy of logs.

Good luck.

Michael Kimsal
http://www.tapinternet.com/php/
PHP training courses
734-480-9961



-- 
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] Re: error message

2001-09-22 Thread Gaylen Fraley

You forgit the $ sign.  Should be

if(!$submit)

--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com
PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts

"Peter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I was wondering does anyone know what this particular error message means:
>
> Warning: Use of undefined constant submit - assumed 'submit' in
> /usr/local/apache/htdocs/mm2/mymarket/privatedirectory/db/newthread.php on
> line 110
>
> But I already defined submit button as shown in the php script here:
>
> 
>
> But for some reason when it goes to line 110 as shown just below, it says
> that it is undefined:
>
> if(!submit) {
>
> if(validate_input($name, $email, $subject, $message) == 0) {
>
>
> What should I check for?
>
> Thanks.
>
> Peter
>
>



-- 
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] witing for a post

2001-09-22 Thread Gianluca Baldo

Hi all -
i have set up a credit card gateway interface. The gateway sends an
answer to a URL (i.e. http://www.domain.com/answer.php)
I pass to it with the some other data.
My bank documentation is poor and the support is worst.

My question is: how do I make my script at http://www.domain.com/answer.php
to wait for the answer?
The gateway send its answer via POST to the URL I specify but I don't
know how to "stay there listening for the answer".

Any idea?
Thanks in advance

 Gianluca


--
ALBASOFTWARE
C/ Mallorca 186 - 3º 1ª
08036 Barcelona (Spain)
Tel. +34 93454009 - +34 934549324
Fax. +34 934541979
[EMAIL PROTECTED]
http://www.albasoftware.com
http://www.phpauction.org
http://www.gianlucabaldo.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]Packing file data into a variable???

2001-09-22 Thread Chris Cocuzzo

hey-

my main goal here is to be able to stream an mp3 through any player that can accept 
m3u files. My idea was to use the format of an m3u file, which looks like this:

#EXTM3U
#EXTINF:324,cs-1.mp3
http://www.fplg.net/audio/cs-1.mp3

and pack it into a variable to be sent out using a header command...as such:

$buffer = "#EXTM3U\n";
$buffer .= "#EXTINF:-1,cs-1.mp3\n";
$buffer .= http://www.fplg.net/audio/cs-1.mp3;

I'm not sure of the exact header command I should use, or rather the format of the 
command I'd send using the header function, but is this possible or do I need to do 
this some other way??

chris



RE: [PHP] writting into a text file

2001-09-22 Thread Nikola Veber

Hi !

I was wondering if it is possible to replace standard radio and submit buttons with 
images. In case of radio buttons that should look like swap image(the image that 
presents the selected item is swaped) for the selected item, and smth like link image 
for submit buttons... I think that escaping from standard form look and feel can 
improve the site layout ...

Thanks
Nikola


-- 
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] witing for a post

2001-09-22 Thread Jack Dempsey

not sure i follow Gianluca...the script will stay there, its not going
anywhere, so why does it need to "wait"? it'll process whatever info is sent
to it

-jack

-Original Message-
From: Gianluca Baldo [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 22, 2001 2:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] witing for a post


Hi all -
i have set up a credit card gateway interface. The gateway sends an
answer to a URL (i.e. http://www.domain.com/answer.php)
I pass to it with the some other data.
My bank documentation is poor and the support is worst.

My question is: how do I make my script at http://www.domain.com/answer.php
to wait for the answer?
The gateway send its answer via POST to the URL I specify but I don't
know how to "stay there listening for the answer".

Any idea?
Thanks in advance

 Gianluca


--
ALBASOFTWARE
C/ Mallorca 186 - 3º 1ª
08036 Barcelona (Spain)
Tel. +34 93454009 - +34 934549324
Fax. +34 934541979
[EMAIL PROTECTED]
http://www.albasoftware.com
http://www.phpauction.org
http://www.gianlucabaldo.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]




[PHP] GD Library help

2001-09-22 Thread Jay Paulson

Do all versions of the GD library for Linux that are version 1.6 and above
not support any GIF formats?  I have 1.8 and in the manual I thought that it
was only version 1.6 that didn't support GIF format.  However, when I run
ImageCreateFromGIF() or ImageGIF() I get an error saying that it's not
supported in PHP.  Also, I wanted to use the ImageCopyResampled but that's
only supported in GD 2.0.  Is there a GD 2.0 for Redhat 7.1?

Thanks,
Jay


-- 
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[2]: [PHP] witing for a post

2001-09-22 Thread Gianluca Baldo

Sorry Jack -
thanks for the answer... I probably didn't explain it correctly.

>From page A users have a link to reach the gateway (via POST) leaving
my site (this opens a new browser page).
As soon as they leave the site, page A changes to another page let's
say B. The URL of page B is what I pass to the gateway to have the
answer back.
Users, once reached the gateway, application fill in their data and the
payment is processed. A confirmation/denegation page is shown and
that's it.
So page B should "wait" there for the gateway's answer... for example
reloading every x seconds using a Javascript REFRESH or something like
that. The script will process what in HTTP_POST_VARS...

while waiting B will output something like "Processing you payment.."
and when it receives the answer from the gateway it must update some
database table and display a final confirmation or output a
"transaction not successful".

Thanks
  Gianluca



JD> not sure i follow Gianluca...the script will stay there, its not going
JD> anywhere, so why does it need to "wait"? it'll process whatever info is sent
JD> to it

JD> -jack

JD> -Original Message-
JD> From: Gianluca Baldo [mailto:[EMAIL PROTECTED]]
JD> Sent: Saturday, September 22, 2001 2:06 PM
JD> To: [EMAIL PROTECTED]
JD> Subject: [PHP] witing for a post


JD> Hi all -
JD> i have set up a credit card gateway interface. The gateway sends an
JD> answer to a URL (i.e. http://www.domain.com/answer.php)
JD> I pass to it with the some other data.
JD> My bank documentation is poor and the support is worst.

JD> My question is: how do I make my script at http://www.domain.com/answer.php
JD> to wait for the answer?
JD> The gateway send its answer via POST to the URL I specify but I don't
JD> know how to "stay there listening for the answer".

JD> Any idea?
JD> Thanks in advance

JD>  Gianluca


JD> --
JD> ALBASOFTWARE
JD> C/ Mallorca 186 - 3º 1ª
JD> 08036 Barcelona (Spain)
JD> Tel. +34 93454009 - +34 934549324
JD> Fax. +34 934541979
JD> [EMAIL PROTECTED]
JD> http://www.albasoftware.com
JD> http://www.phpauction.org
JD> http://www.gianlucabaldo.com


JD> --
JD> PHP General Mailing List (http://www.php.net/)
JD> To unsubscribe, e-mail: [EMAIL PROTECTED]
JD> For additional commands, e-mail: [EMAIL PROTECTED]
JD> To contact the list administrators, e-mail: [EMAIL PROTECTED]





--
ALBASOFTWARE
C/ Mallorca 186 - 3º 1ª
08036 Barcelona (Spain)
Tel. +34 93454009 - +34 934549324
Fax. +34 934541979
[EMAIL PROTECTED]
http://www.albasoftware.com
http://www.phpauction.org
http://www.gianlucabaldo.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] writting into a text file

2001-09-22 Thread Urb LeJeune


>for submit buttons... I think that escaping from standard form look and 
>feel can
>improve the site layout ...

 Respectively disagree. That's like saying let put the ignition on 
the arm
rest to improve the layout. Much research has been done and users almost
universally like things that are intuitive. I personally thinks it's a bad 
design
mistake to trade cosmetic considerations for standard functionality.

Urb


-- 
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] Help: Is a bug or No? $php_errormsg is not working correctly! I`m absolutely sure. Can anybody fis this problem?

2001-09-22 Thread Newmail

Hy Richard,

It`s me again. I understand what you suggest me but is not necesarry to
declare GLOBAL, variable $php_errormsg !!! Elsewhere is the problem

I made a little script that can ilustrate my opinion:
OR IS O BUG IN PHP, or my first computer require
a little update.

Run this script on your computer.

";

#Here, the variabile $cache is not initialized. Track_erros function is
working!
$value = @$cache;
echo "Second error was $php_errormsg ";

$link=mysql_connect("localhost", "php", "aa");
mysql_select_db("ecomerce");

#Here is another intentional error: The table selecteted does not exist!
#HERE IS THE PROBLEM: Track_erros function is NOT WORKING!
$result = @mysql_query ("select * from scontari") ;
#echo mysql_error($link)."";
echo $php_errormsg;
?>

This script produce the following output on my first system, with RedHat
6.2:

I). syntax echo mysql_error($link).""; is COMMENTED
First error was file("tata.txt") - No such file or directory
Second error was Undefined variable: cache
Undefined variable: cache

II). syntax echo mysql_error($link).""; is UNCOMMENTED
First error was file("tata.txt") - No such file or directory
Second error was Undefined variable: cache
Table 'ecomerce.scontari' doesn't exist
Undefined variable: cache

This is the output produced by the SAME script in case I) but on the second
system, with RedHat 7.1

III). syntax echo mysql_error($link).""; is COMMENTED
First error was file("tata.txt") - No such file or directory
Second error was Undefined variable: cache
MySQL: A link to the server could not be established

So, track_errors function is WORKING

In conclusion: Or is a BUG in php-4.0.6 in function track_errors,
Or my first system require an upate with any new libraries!!!
What is the name for this library?

Can somebody FIX this problem?

Many thanks in advance for your reply,
Alex

- Original Message -
From: Richard Lynch <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 6:20 AM
Subject: Re: Track_errors function posibile a BUG or require an upadate


> I'm guessing that maybe you are printing out $php_errormsg when there was
no
> error?...
>
> Or are you forgetting to use global $php_errormsg inside your function?...
>
>
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: <[EMAIL PROTECTED]>
> Sent: Friday, September 21, 2001 11:08 AM
> Subject: Track_errors function posibile a BUG or require an upadate
>
>
> >
> > I have a serious problem with function track_errors in PHP4.0.6
> > Every time i want to use variable php_errormsg to catch the error, i
> > receive
> > this message:
> >
> > Warning: Undefined variable: php_errormsg in
> > /usr/local/apache/htdocs/teste/c10/ex19.php on line 85
> > Query failed: error was ''
> >
> > I want to mention that:
> > - no one errors in compilation process for PHP 4.0.6 and APACHE 1.3.20
> > - in my php.ini file, the track_error function is turned ON
> > - My web server is compiled using DSO and is configured correct(to
support
> > PHP4
> > in httpd.conf and so on...).
> > -i use REDHAT 6.2 updated with vanilla kernel 2.4.9 (with reiserfs
> > installed and
> > all problems regardind upgrade to a new major version of kernel,
solved).
> > -the script used to test function track_errors is absolutely correct. I
> > said this,
> > because i have the SECOND SYSTEM which is configured with the same
options
> > for
> > Apache web server 1.3.20 AND PHP4.0.6, and this script WORKS ==>> so in
> > this case
> > for my first system is exclus a problem regarding compilation AND ANY
> > configuration
> > options!!!
> > -in rest, everything works fine.
> >
> > EXIST ONLY ONE DIFFERENCE BETWEEN THIS SYSTEMS:
> > THE SECOND RUN UNDER REDHAT 7.1 (with native filesystem ext2fs)
> >
> > In conclusion, can anybody tell me what library is needed to be upgraded
> on
> > my first
> > system (wih REDHAT6.2) to enable track_error function and php_errormsg ?
> >
> > I want to mention that the same problem was with gd-library. In
> compilation
> > process everithing was fine, but all features of this libraryy in PHP
> > didn`t
> > work till gd-library was updated with a (minimal) correct version.
> >
> > I tryed to find an explanation for my problem reading PHP documentation,
> > but nowhere i can find a minimal information.
> >
> > A prompt reply would be appreciated.
> >
> > Alex
>




[PHP] Some question about sessions

2001-09-22 Thread Diadon

How to send session id in URL as path for example
www.somehost.com/ea9e8d564ea55f1b88c0a/index.php3?

and how to get this id?



-- 
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] num2string wish list

2001-09-22 Thread Thomas Deliduka

I don't know if this exists already, I'm looking for it but I'm not coming
up with much of anything.

Basically, a function to take a number and convert it to a string:

1 converts to "one"
365 converts to "three hundred sixty-five"

This would be awesome for me.

-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.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] error message

2001-09-22 Thread Mark Roedel

> -Original Message-
> From: Peter [mailto:[EMAIL PROTECTED]] 
> Sent: Saturday, September 22, 2001 12:10 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] error message
> 
> 
> I was wondering does anyone know what this particular error 
> message means:
> 
> Warning: Use of undefined constant submit - assumed 'submit' in
> /usr/local/apache/htdocs/mm2/mymarket/privatedirectory/db/newt
> hread.php on
> line 110
> 
> But I already defined submit button as shown in the php script here:
> 
> 
> 
> But for some reason when it goes to line 110 as shown just 
> below, it says that it is undefined:
> 
> if(!submit) {

Try changing this to

if (!$submit) {


---
Mark Roedel |  "Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained."
Longview, Texas, USA|   -- John Powell 

--
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] Re: ftp in PHP4

2001-09-22 Thread Chesley A. Windon

Since my original post, the status has changed but let me recap...

The file /home/windon/somefile did have permissions set to have anyone
read it, but I never checked the permissions on the /home/windon
directory.  This has since been corrected.

Next I was getting a permission denied error, which I found to be on the
destination host.  I had to give permissions of 777 to the destination
directory for file transfer to happen.  I find this as a security issue.

Has anyone experienced this, or know of a work around?

Thanks again,

Chesley

> Does the PHP user (nobody) have read access to the local file you are
trying
> to upload?
> Are you 100% sure you have the right things in the filenames?...  Print them
> out right before the ftp_puts line.
>
> > I need to have web based ftp capabilities for a site I am working on.  My
> > development server is running RedHat 7.1 and php-4.0.4, and I did compile
> > php with the --enable-ftp switch.
> >
> > After reading the docs at php.net, I found a "canned" script
> > (http://www.php.net/manual/en/ref.ftp.php) that I thought I would try so
> > as to give me a better idea on what was involved.
> >
> > When running the script, I can connect to the ftp server, list the
> > contents of the directory, and disconnect, but cannot upload anything.
> > When I try, I get the following error:
> >
> > Warning: error opening /home/windon/somefile in
> > /var/www/html/ftp.php on line 43
> >
> > line 43 reads:
> >
> > $upload = ftp_put($conn_id, "$destination_file", "$source_file",
> > FTP_BINARY);
> >
> > In $destination_file I have just the filename, while in $source_file I
> > have the full path and the filename.
> >
> > Thanks,
> >
> > Chesley
> >
>


-- 
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] GD Library help

2001-09-22 Thread Don Read


On 22-Sep-2001 Jay Paulson wrote:
> Do all versions of the GD library for Linux that are version 1.6 and above
> not support any GIF formats?

Yes, It was removed due to copyright restrictions.
from http://www.boutell.com/gd/manual1.8.4.html :

" Support for GIF has been removed. This step was taken to completely avoid the
legal controversy regarding the LZW compression algorithm used in GIF. Unisys
holds a patent which is relevant to LZW compression. " 

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do 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]




[PHP] Re: $php_errormsg is not workink correctly! I`m absolutely sure. Can anybody fis this problem?

2001-09-22 Thread Richard Lynch

That's not a PHP error.
You'll need to use mysql_error()

Or, perhaps there is a setting somewhere to get mysql_error() to also fill
in $php_errormsg, but I dunno what it is...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Newmail <[EMAIL PROTECTED]>
To: Richard Lynch <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 10:50 AM
Subject: $php_errormsg is not workink correctly! I`m absolutely sure. Can
anybody fis this problem?


> Hy Richard,
>
> It`s me again. I understand what you suggest me but is not necesarry to
> declare GLOBAL, variable $php_errormsg !!! Elsewhere is the
problem
>
> I made a little script that can ilustrate my opinion:
> OR IS O BUG IN PHP, or my first computer require
> a little update.
>
> Run this script on your computer.
>
>  /* Intentional errors */
> #Here, selected file does not exist. Track_erros function is working!
> $test = @file ('tata.txt');
> echo "First error was $php_errormsg ";
>
> #Here, the variabile $cache is not initialized. Track_erros function is
> working!
> $value = @$cache;
> echo "Second error was $php_errormsg ";
>
> $link=mysql_connect("localhost", "php", "aa");
> mysql_select_db("ecomerce");
>
> #Here is another intentional error: The table selecteted does not exist!
> #HERE IS THE PROBLEM: Track_erros function is NOT WORKING!
> $result = @mysql_query ("select * from scontari") ;
> #echo mysql_error($link)."";
> echo $php_errormsg;
> ?>
>
> This script produce the following output on my first system, with RedHat
> 6.2:
>
> I). syntax echo mysql_error($link).""; is COMMENTED
> First error was file("tata.txt") - No such file or directory
> Second error was Undefined variable: cache
> Undefined variable: cache
>
> II). syntax echo mysql_error($link).""; is UNCOMMENTED
> First error was file("tata.txt") - No such file or directory
> Second error was Undefined variable: cache
> Table 'ecomerce.scontari' doesn't exist
> Undefined variable: cache
>
> This is the output produced by the SAME script in case I) but on the
second
> system, with RedHat 7.1
>
> III). syntax echo mysql_error($link).""; is COMMENTED
> First error was file("tata.txt") - No such file or directory
> Second error was Undefined variable: cache
> MySQL: A link to the server could not be established
>
> So, track_errors function is WORKING
>
> In conclusion: Or is a BUG in php-4.0.6 in function track_errors,
> Or my first system require an upate with any new libraries!!!
> What is the name for this library?
>
> Can somebody FIX this problem?
>
> Many thanks in advance for your reply,
> Alex
>
> - Original Message -
> From: Richard Lynch <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, September 22, 2001 6:20 AM
> Subject: Re: Track_errors function posibile a BUG or require an upadate
>
>
> > I'm guessing that maybe you are printing out $php_errormsg when there
was
> no
> > error?...
> >
> > Or are you forgetting to use global $php_errormsg inside your
function?...
> >
> >
> >
> > --
> > WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> > [EMAIL PROTECTED]
> > Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
> > Volunteer a little time: http://chatmusic.com/volunteer.htm
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > Newsgroups: php.general
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, September 21, 2001 11:08 AM
> > Subject: Track_errors function posibile a BUG or require an upadate
> >
> >
> > >
> > > I have a serious problem with function track_errors in PHP4.0.6
> > > Every time i want to use variable php_errormsg to catch the error, i
> > > receive
> > > this message:
> > >
> > > Warning: Undefined variable: php_errormsg in
> > > /usr/local/apache/htdocs/teste/c10/ex19.php on line 85
> > > Query failed: error was ''
> > >
> > > I want to mention that:
> > > - no one errors in compilation process for PHP 4.0.6 and APACHE 1.3.20
> > > - in my php.ini file, the track_error function is turned ON
> > > - My web server is compiled using DSO and is configured correct(to
> support
> > > PHP4
> > > in httpd.conf and so on...).
> > > -i use REDHAT 6.2 updated with vanilla kernel 2.4.9 (with reiserfs
> > > installed and
> > > all problems regardind upgrade to a new major version of kernel,
> solved).
> > > -the script used to test function track_errors is absolutely correct.
I
> > > said this,
> > > because i have the SECOND SYSTEM which is configured with the same
> options
> > > for
> > > Apache web server 1.3.20 AND PHP4.0.6, and this script WORKS ==>> so
in
> > > this case
> > > for my first system is exclus a problem regarding compilation AND ANY
> > > configuration
> > > options!!!
> > > -in rest, everything works fine.
> 

[PHP] run processes from php as authenticated user

2001-09-22 Thread Bill Pitz

I'd like to write some web based utilities for users to change things like
mail forwarding and vacation autoreplies, as well as password changing.

In order to do these things, I need to have a way for the PHP script to
assume the privileges of the authenticated user.  (If they don't supply
the correct username/password, they won't be allowed to use the tools.)

Is there any way PHP can do this?  I can't just setuid to a static user,
since there are many users who would be using this tool.

I'm sure there's got to be a way, even if it involves other packages as
well.  Any ideas?

Thanks,

-Bill

-- 
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] Re: num2string wish list

2001-09-22 Thread Richard Lynch

If http://php.net/sprintf doesn't do that, check the code archives
http://php.net/links.php

You're not the first to want this, by a long shot...

If all else fails, search the mailing list archives.  It's been posted...
Terms like "number and words and money and check" should pick up the thread.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Thomas Deliduka <[EMAIL PROTECTED]>
Newsgroups: php.general
To: PHP List <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 2:15 PM
Subject: num2string wish list


> I don't know if this exists already, I'm looking for it but I'm not coming
> up with much of anything.
>
> Basically, a function to take a number and convert it to a string:
>
> 1 converts to "one"
> 365 converts to "three hundred sixty-five"
>
> This would be awesome for me.
>
> --
>
> Thomas Deliduka
> IT Manager
>  -
> New Eve Media
> The Solution To Your Internet Angst
> http://www.neweve.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] Re: Some question about sessions

2001-09-22 Thread Richard Lynch

www.example.com/index.php3/ee9e8d564ea55f1b88c0a

 index.php3 ---


If that doesn't work for whatever reason, try using 

You'll probably need http://php.net/explode to separate out your values, and
you'll either need to know in advance which parameters will be in which
position, or you'll need to include the variable names as part of the URL.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Diadon <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 2:14 PM
Subject: Some question about sessions


> How to send session id in URL as path for example
> www.somehost.com/ea9e8d564ea55f1b88c0a/index.php3?
>
> and how to get this id?
>
>


-- 
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] Re: User's editting profiles

2001-09-22 Thread Richard Lynch

15 fields is not a lot, especially if you intend to handle some as
checkboxes, some as text, etc...

If you actually had a *LOT* of fields, you could look at storing some kind
of info about them in another table, and automating the output.

Another option would be to use oohforms (see PHPlib) or somesuch...

But for a couple pages of forms with 15 fields, you're really not gonna save
any time/effort to do all that...

You may wish to create an "editing" page which displays their current
settings -- Just select from the database and print out the VALUE="$foo" as
part of the HTML.

Sample code on every code archive you can find.

http://php.net/links.php

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Kath <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 9:43 AM
Subject: User's editting profiles


I have some user profiles and I'd like them to be able to update them as
they see fit (Change their email, password etc etc).

However, their options are rather long and instead of having these turkeys
have to type in stuff into 8 form fields, I'd like to display the
current data in those fields and then let them just change what needs to be
done.

What is the best way to do this?

My only problem is propogating all their data through the HTML form (I can
manage doing one or two fields, but doing 15 is rather not fun) from the
database (two different tables too, including checkboxes).

- k



-- 
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]Packing file data into a variable???

2001-09-22 Thread Richard Lynch

header("Content-type: audio/m3u");  # Or something not unlike that... Check
what you get for a static m3u file.
header("Content-length: " . strlen($buffer));

Those two should do it.

If you have problems, check the output from a static file, and add headers
until it works...

>From a Un*x command prompt, just do this:

telnet yourserver.com 80
GET /some/path/to/static.m3u HTTP/1.0


Hit return twice after that last line.

If you're on Windoze, you'll need to find a telnet client that will let you
send raw commands, which, alas, is not what ships with Windows.  You end up
with some damn GUI if you try this in a default config from MS-DOS prompt
:-(

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Chris Cocuzzo <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 12:51 PM
Subject: [PHP]Packing file data into a variable???


hey-

my main goal here is to be able to stream an mp3 through any player that can
accept m3u files. My idea was to use the format of an m3u file, which looks
like this:

#EXTM3U
#EXTINF:324,cs-1.mp3
http://www.fplg.net/audio/cs-1.mp3

and pack it into a variable to be sent out using a header command...as such:

$buffer = "#EXTM3U\n";
$buffer .= "#EXTINF:-1,cs-1.mp3\n";
$buffer .= http://www.fplg.net/audio/cs-1.mp3;

I'm not sure of the exact header command I should use, or rather the format
of the command I'd send using the header function, but is this possible or
do I need to do this some other way??

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] Re: Site Search

2001-09-22 Thread Richard Lynch

Search for "htdig" on the 'net.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Vishal Khialani <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Friday, September 21, 2001 11:14 PM
Subject: Site Search


> Hi,
>   I need to have a search on my site and was about to start working on it.
> Can anyone pls send their code if they have made one allready ?
> Thanks,
> Vishal
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>


-- 
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] Re: num2string wish list

2001-09-22 Thread Cristopher Daniluk

px.sklar.com used to have code that did something like this. Do a google
search for some pseudo code that does it if not. You should be able to
easily port it to PHP..

Cris
> -Original Message-
> From: Richard Lynch [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, September 22, 2001 4:04 PM
> To: Thomas Deliduka
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] Re: num2string wish list
>
>
> If http://php.net/sprintf doesn't do that, check the code archives
> http://php.net/links.php
>
> You're not the first to want this, by a long shot...
>
> If all else fails, search the mailing list archives.  It's
> been posted...
> Terms like "number and words and money and check" should pick
> up the thread.
>
> --
> WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> [EMAIL PROTECTED]
> Wanna help me out?  Like Music?  Buy a CD:
> http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
> - Original Message -
> From: Thomas Deliduka <[EMAIL PROTECTED]>
> Newsgroups: php.general
> To: PHP List <[EMAIL PROTECTED]>
> Sent: Saturday, September 22, 2001 2:15 PM
> Subject: num2string wish list
>
>
> > I don't know if this exists already, I'm looking for it but
> I'm not coming
> > up with much of anything.
> >
> > Basically, a function to take a number and convert it to a string:
> >
> > 1 converts to "one"
> > 365 converts to "three hundred sixty-five"
> >
> > This would be awesome for me.
> >
> > --
> >
> > Thomas Deliduka
> > IT Manager
> >  -
> > New Eve Media
> > The Solution To Your Internet Angst
> > http://www.neweve.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]




[PHP] KISGB - PHP Guestbook

2001-09-22 Thread Gaylen Fraley

Since I originally announced this guestbook app here and so many have
downloaded it (thanks!), I need to let you know that I recommend getting the
latest copy.  I have done quite a bit of work, even up to the sending of
this.  There were a couple of warning messages that were appearing and there
have been some Netscape display issues (browser wars!).  In any event, I
will not flood the ng with more announcements, but this really was the
easiest way as opposed to sending out dozens of e-mails.  Thanks for your
indulgence and your support!

--
Gaylen
[EMAIL PROTECTED]
http://www.gaylenandmargie.com
PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts




-- 
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] naming convention in php?

2001-09-22 Thread saif

thanks Chris,
i would have checked the link but it seems that online php documentation has
gone haywire.


best regards from saif
---
[php 406, apache 1312, winme]
[mysql 32321, personal oracle 8]



*
On Tue, 18 Sep 2001 09:56:56 -0700, Chris Bailey wrote:


|  The Pear project has established some for it's work, which is being
|  integrated with the standard PHP.  You might start with those.
|  http://pear.php.net I think.  You can really just make your own.  I tend to
|  use almost the exact same things I use in my Java code.
|
|  -Original Message-
|  From: saif [mailto:[EMAIL PROTECTED]]
|  Sent: Saturday, September 15, 2001 6:28 AM
|  To: [EMAIL PROTECTED]
|  Subject: [PHP] naming convention in php?
|
|
|  hi,
|  i want to know is there any naming convention followed in php as
|  in c/c++/java/etc.
|  i am puzzled how naming of variables are done in large scale
|  projects, where codes are written by one and debug by others.
|
|
|  best regards from saif
|  ---
|  [php 406, apache 1312, winme]
|  [mysql 32321, personal oracle 8]
|
|
|
|
|
|
|  _
|  Do You Yahoo!?
|  Get your free @yahoo.com address at http://mail.yahoo.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]





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.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] Re: Sessions and include()...

2001-09-22 Thread Matthew Walker

Alright. If that's the case, how do you make sure a cookie gets set for
the remote domain? I'm working on a project to write a hosted shopping
cart, but we want people to have the ability to include pieces of the
display functionality on their own pages, if their host supports PHP.
But those pieces would need to use the same session as if they were on
/our/ server.

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 21, 2001 10:25 PM
To: Matthew Walker
Cc: [EMAIL PROTECTED]
Subject: [PHP] Re: Sessions and include()...

I believe:

include() gets parsed and executed on the server that is doing the
include-ing, not the remote server...

If that file has session_xxx() in it, you'll have started a session and
whatnot on the local server.

The remote server doesn't even have to have PHP on it at all, and its
configuration is irrelevant, other than allowing you to read some file
that
happens to have PHP source code in it...  Which, by the way, is a very
scarey concept unless you have complete security control over the remote
server...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Matthew Walker <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Friday, September 21, 2001 11:48 AM
Subject: Sessions and include()...


> What happens if you use include() to include a file from another
server,
> and that file sets a session? Does the session get set for the domain
of
> the wrapper page, or does it get set for the domain of the included
> page?
>
> --
> Matthew Walker
> Ecommerce Project Manager
> Mountain Top Herbs
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001
>
>


-- 
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]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.280 / Virus Database: 147 - Release Date: 9/11/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.280 / Virus Database: 147 - Release Date: 9/11/2001



-- 
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] percentage problems

2001-09-22 Thread Tyler Longren

Hello all,

I'm having some troubles making correct percentages.

I'm writing a simple poll system.  Is there an easy way to generate
percentages?  I know to divide and all that good stuff.  I do substr to get
rid of the decimals, but sometimes the percentages still aren't displayed
correctly.  How do you people usually go about doing percentages?

Thanks,
Tyler Longren



-- 
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] percentage problems

2001-09-22 Thread Tyler Longren

Thanks for that.  Assigning a type to that variable never even occured to
me.  :-)

Tyler

- Original Message -
From: "Matt Greer" <[EMAIL PROTECTED]>
To: "Tyler Longren" <[EMAIL PROTECTED]>; "PHP-General"
<[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 4:52 PM
Subject: Re: [PHP] percentage problems


> On Saturday 22 September 2001 16:41, you wrote:
> > Hello all,
> >
> > I'm having some troubles making correct percentages.
> >
> > I'm writing a simple poll system.  Is there an easy way to generate
> > percentages?  I know to divide and all that good stuff.  I do substr to
get
> > rid of the decimals, but sometimes the percentages still aren't
displayed
> > correctly.  How do you people usually go about doing percentages?
>
> Better than substr is to cast the variable to be an int
>
> (int)$firstpercent
>
> would force the variable to be an integer, chopping off any decimals it
may
> have. Other than that I don't really know what to say. Determining
percentage
> is more a math thing than php. Maybe take a look at other poll scripts out
> there (there's tons of them).
>
> Keep in mind both substr and casting to an integer are essentially always
> rounding down. So if your values are 58.9, 12.6, and 28.5 then you'll lose
2
> percent after all is said and done.
>
> Matt
>
> --
> 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] percentage problems

2001-09-22 Thread Matt Greer

On Saturday 22 September 2001 16:41, you wrote:
> Hello all,
>
> I'm having some troubles making correct percentages.
>
> I'm writing a simple poll system.  Is there an easy way to generate
> percentages?  I know to divide and all that good stuff.  I do substr to get
> rid of the decimals, but sometimes the percentages still aren't displayed
> correctly.  How do you people usually go about doing percentages?

Better than substr is to cast the variable to be an int

(int)$firstpercent

would force the variable to be an integer, chopping off any decimals it may 
have. Other than that I don't really know what to say. Determining percentage 
is more a math thing than php. Maybe take a look at other poll scripts out 
there (there's tons of them).

Keep in mind both substr and casting to an integer are essentially always 
rounding down. So if your values are 58.9, 12.6, and 28.5 then you'll lose 2 
percent after all is said and done.

Matt

-- 
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[2]: [PHP] percentage problems

2001-09-22 Thread slavko dervisevic

Hello matt,
even better is ceil() or floor()
Saturday, September 22, 2001, 11:53:44 PM, you wrote:
>> Better than substr is to cast the variable to be an int


-- 
Best regards,
 slavkomailto:[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: Re[2]: [PHP] percentage problems

2001-09-22 Thread Tyler Longren

Hello,

I tried using the ceil() and floor() functions.  They did not help much.
Ceil() set everything to 1%.  I tried this:

$percent = $num_games/$total_games;
$percent = round($percent, 1);

But again, some of the percentages are:
0.7%

I also tried assigning the $percent variable the int type, but that didn't
work.  Here's an example from doing that:
0.67142857142857%

Any other ideas?

Thank you!!!
Tyler
- Original Message -
From: "slavko dervisevic" <[EMAIL PROTECTED]>
To: "Matt Greer" <[EMAIL PROTECTED]>
Cc: "PHP-General" <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 4:58 PM
Subject: Re[2]: [PHP] percentage problems


> Hello matt,
> even better is ceil() or floor()
> Saturday, September 22, 2001, 11:53:44 PM, you wrote:
> >> Better than substr is to cast the variable to be an int
>
>
> --
> Best regards,
>  slavkomailto:[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] naming convention in php?

2001-09-22 Thread Alexander Skwar

So sprach »saif« am 2001-09-15 um 18:58:29 +0530 :
> i want to know is there any naming convention followed in php as
> in c/c++/java/etc.

I'm trying to follow PEAR coding style

-> http://php.net/manual/en/pear.standards.php

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 11 hours 27 minutes

--
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] naming convention in php?

2001-09-22 Thread Alexander Skwar

So sprach »saif« am 2001-09-23 um 00:33:27 +0530 :
> thanks Chris,
> i would have checked the link but it seems that online php documentation has
> gone haywire.

Well, it's working right now.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 11 hours 28 minutes

--
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] percentage problems

2001-09-22 Thread Alexander Skwar

So sprach »Tyler Longren« am 2001-09-22 um 17:14:46 -0500 :
 
> Any other ideas?

number_format ?

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 3 days 11 hours 30 minutes

--
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] PHP safe_mode and reading /etc/passwd file

2001-09-22 Thread Richard Kurth

I have a little problem... I had to enable the PHP safe_mode, and
now I receive this error message when I try to read the passwd file
on the server :

Warning: SAFE MODE Restriction in effect. The script whose uid is
110 is not allowed to access /etc/passwd owned by uid 0 in
/home/sites/home/inc/function.inc on line 462

Warning: file("/etc/passwd") - Success in
/home/sites/home/inc/function.inc on line 462











Best regards,
 Richard  
mailto:[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[4]: [PHP] percentage problems

2001-09-22 Thread slavko dervisevic

Hello Tyler,
try
$percent = ceil(100*$num_games/$total_games);

-- 
Best regards,
 slavkomailto:[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] eregi_replace problem

2001-09-22 Thread Daniel Goldin

DSolved. Problem was a typo in other script called by this one. Many
apologies to the list.

Best,

daniel

-Original Message-
From: Daniel Goldin [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 9:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] eregi_replace problem


The following does what it's meant to do: replace [i} and [ei} with the html
eqivalenets.

$welcome_html = eregi_replace("\[i]","",$welcome_html);
$welcome_html = eregi_replace("\[ei]","",$welcome_html);

Why does the following NOT work?

$welcome_html = eregi_replace("\[c]","",$welcome_html);
$welcome_html = eregi_replace("\[ec]","",$welcome_html);

Any help gratefully appreciated.



Daniel Goldin   [EMAIL PROTECTED]
Creative Director   323.225.1926

 BlueLamp Productions
   www.blue-lamp.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]




[PHP] Disk Usage

2001-09-22 Thread Scott Poarch

Hi all,

I'm trying to find a script that will return the same kind of data I get
with du. I want a page to list current disk usage by virtual domain on our
servers. I see the diskfreespace and disk_total_space commands, but they
doesn't seem to work at all for me.

Anybody know of a good script?
-- 
Scott Poarch
http://www.globalhost.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] Disk Usage

2001-09-22 Thread Steve Werby

"Scott Poarch" <[EMAIL PROTECTED]> wrote:
> I'm trying to find a script that will return the same kind of data I get
> with du. I want a page to list current disk usage by virtual domain on our
> servers. I see the diskfreespace and disk_total_space commands, but they
> doesn't seem to work at all for me.

If you're on Linux or another un*x, try calling 'du' using system() or a
similar command.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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] MySQL and PHP problem

2001-09-22 Thread Ben Edwards

[Reposting cos left error message out, sorry] Had a fully working 
installation of MySQL 3.23 with PHP 6.0.6.  I then foolishly installed PGP 
which included PGPNet and I cant access my MySQL database from PHP.  When I 
try to connect I get error 'Access denied for user: '@GREEN' to database 
'subvert_cd'
', another strange thing is under MyODBC it says 'Not Found'.  I have 
re-installed both PHP and MySQL (actually installed 3.23.42) after first 
de-installing PHP but still no luck.

Regards,
Ben
--
This Email account is protected by http://www.spamcop.net
ALL spam is reported to ISP and there network provider
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
* Ben Edwards [EMAIL PROTECTED]   +352 091 429995 *
* Homepagehttp://www.gifford.co.uk/~bedwards *
* i-Contact Progressive Videohttp://www.videonetwork.org *
* Smashing the Corporate image http://www.subvertise.org *
* Bristol's radical newshttp://www.bristle.co.uk *
* Open Directory Project http://www.dmoz.org *
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+

-- 
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] Disk Usage

2001-09-22 Thread Scott Poarch

Thanks for the quick reply.

I've been tring variations on that for a while with little success. This is
not necessarily my best hope, but it's the version I happen to be at at the
moment:

$command = "du > test2";
system($command);

Any ideas?
-- 
Scott Poarch
http://www.globalhost.com
 - - - - - - - - - - - -

> From: "Steve Werby" <[EMAIL PROTECTED]>
> Organization: Befriend Internet Services LLC
> Date: Sat, 22 Sep 2001 20:44:32 -0400
> To: "Scott Poarch" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Disk Usage
> 
> "Scott Poarch" <[EMAIL PROTECTED]> wrote:
>> I'm trying to find a script that will return the same kind of data I get
>> with du. I want a page to list current disk usage by virtual domain on our
>> servers. I see the diskfreespace and disk_total_space commands, but they
>> doesn't seem to work at all for me.
> 
> If you're on Linux or another un*x, try calling 'du' using system() or a
> similar command.
> 
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.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] Strange output by phpinfo()

2001-09-22 Thread Jeroen Geusebroek


While viewing my phpinfo() page, i got this:

QUERY_STRING



%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucb
d3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u%u00
=a 

REQUEST_URI
/default.ida?XXX


X%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9
090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0
078%u%u00=a

Of course I wasn't using this query for my phpinfo() page. Where did PHP
get this information from? This info was under the header "Environment"
Not that I have any troubles with this, but it seems weird to me. 

Thanks,

Jeroen

Ps. Of course I know what that QUERY is, but why is it in my phpinfo()
output when I didn't use that query?


-- 
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] Disk Usage

2001-09-22 Thread Matthew Loff


chdir() to the directory you want the size of, and do:

$usage = (int)`du -sk`;   // size in kilobytes
$usage = (int)`du -sb`;   // size in bytes

Now $usage will have the size in integer form.


-Original Message-
From: Scott Poarch [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, September 22, 2001 9:00 PM
To: Steve Werby; [EMAIL PROTECTED]
Subject: Re: [PHP] Disk Usage


Thanks for the quick reply.

I've been tring variations on that for a while with little success. This
is not necessarily my best hope, but it's the version I happen to be at
at the
moment:

$command = "du > test2";
system($command);

Any ideas?
-- 
Scott Poarch
http://www.globalhost.com
 - - - - - - - - - - - -

> From: "Steve Werby" <[EMAIL PROTECTED]>
> Organization: Befriend Internet Services LLC
> Date: Sat, 22 Sep 2001 20:44:32 -0400
> To: "Scott Poarch" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Disk Usage
> 
> "Scott Poarch" <[EMAIL PROTECTED]> wrote:
>> I'm trying to find a script that will return the same kind of data I 
>> get with du. I want a page to list current disk usage by virtual 
>> domain on our servers. I see the diskfreespace and disk_total_space 
>> commands, but they doesn't seem to work at all for me.
> 
> If you're on Linux or another un*x, try calling 'du' using system() or

> a similar command.
> 
> --
> Steve Werby
> President, Befriend Internet Services LLC http://www.befriend.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] Disk Usage

2001-09-22 Thread Scott Poarch

I appreciate the help.

I understand the 'du -sk', but what's the "(int)" all about. Are you
suggesting using:

$usage = (int)`du -sk`;

in the PHP code, as in:

chdir($basedir); 
$usage = (int)'du -sk';
print("$usage is usage");

?

Thanks,
-- 
Scott Poarch
http://www.globalhost.com
 - - - - - - - - - - - -

> From: "Matthew Loff" <[EMAIL PROTECTED]>
> Organization: Willetts Systems
> Date: Sat, 22 Sep 2001 22:07:26 -0400
> To: "'Scott Poarch'" <[EMAIL PROTECTED]>, "'Steve Werby'"
> <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: RE: [PHP] Disk Usage
> 
> $usage = (int)`du -sk`;


-- 
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] Is there a way to override safe mode to be able to read a etc/passwd file

2001-09-22 Thread Richard Kurth

How can I read the /etc/passwd file when safe mode is turned on. is
there a work around on this. Hear is a function I use to check if a
username is already in use on the system. This works fine when safe
mode is off but when it is on it gives this error.
Warning: SAFE MODE Restriction in effect. The script whose uid is 110 is not allowed 
to access /etc/passwd
owned by uid 0 in /home/sites/home/inc/function.inc on line 462
Warning: file("/etc/passwd") - Success in /home/sites/home/inc/function.inc on line 462


function pass() {
$pass=file("/etc/passwd");
for ($i=0; $iThe Username $Username is already being used on this system ");
   exit;
}}
}








Best regards,
 Richard  
mailto:[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] Disk Usage

2001-09-22 Thread Matthew Loff


Yes, that's exactly what I'm suggesting...

Say output of du -sk is:

1022  .

The dot represents the current directory.  By typecasting it to an
integer, using (int), PHP will drop the dot and whitespace in between...

So, typecasting "1022  ." to int gives you 1022 by itself.

Good luck!
-Matt


-Original Message-
From: Scott Poarch [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, September 22, 2001 10:37 PM
To: Matthew Loff; 'Steve Werby'; [EMAIL PROTECTED]
Subject: Re: [PHP] Disk Usage


I appreciate the help.

I understand the 'du -sk', but what's the "(int)" all about. Are you
suggesting using:

$usage = (int)`du -sk`;

in the PHP code, as in:

chdir($basedir); 
$usage = (int)'du -sk';
print("$usage is usage");

?

Thanks,
-- 
Scott Poarch
http://www.globalhost.com
 - - - - - - - - - - - -

> From: "Matthew Loff" <[EMAIL PROTECTED]>
> Organization: Willetts Systems
> Date: Sat, 22 Sep 2001 22:07:26 -0400
> To: "'Scott Poarch'" <[EMAIL PROTECTED]>, "'Steve Werby'" 
> <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: RE: [PHP] Disk Usage
> 
> $usage = (int)`du -sk`;


-- 
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] mysql_connect failes w/ variables and defines. why?

2001-09-22 Thread Dana Holt

Does anyone know why if I pass mysql_connect() or mysql_select_db() parms as
variables or defined constants the connection always fails? If I copy and
paste the values I assign to the variable or the defined constant it works
like a champ. Can anyone explain this?

Thanks in advance.

--
Dana Holt / [EMAIL PROTECTED]
Xenos Online
http://www.xenosonline.com/
---
http://www.theydidmewrong.com/
http://www.shedidmewrong.com/
http://www.hedidmewrong.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] http authentication and php

2001-09-22 Thread Jeff Bristow

I am trying to write a php script that will work around a http authentication that I 
do have access to. I am trying to do this so that a form process in my control panel 
can automatically have information sent to it from a form that a user will fill out. 
However, my problem is in trying to get PHP to automatically authenticate.


for example:  I want to be able to call a url like this:  
http://server.com/greendocks/locked/useradd.htm?user=blah&pass=blahbut this url is 
behind a http authentication.  Is it possible to have this url called by a php script?

And the second part of the question is can I do this process so it is completely 
invisible to the user that this page has been called? Because of course I don't want 
to allow users to have access to everything in my control panel.

Hopefully someone knows what I'm getting at. Thanks for any help you may be able to 
provide.

Jeff



[PHP] Assistance Please - Two-Dimension Arrays

2001-09-22 Thread Mark van Proctor

I'm trying to fill information that i read out of files into a 2 dimensional
array.
My main problem (i think) is that i dont know how to declare a 2 dimensional
array prior to adding parts to it.
Especially since the size of each internal array and the external array are
all picked up from the files and read as strings - i'm not sure how to
convert these to ints.

I don't know how to test if the data is beign stored in the array because
when i come out of the "entry" loop, the count() size of the array is 0.

I'm very new at this so any help you can offer is greatly appreciated.

Thanks,

Mark



-- 
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] !!Burn DVD using your CDRW!!

2001-09-22 Thread nobody


Hi!

Yes it sounds too good to be true but it IS true!
You can burn your very own DVD with a regular CD burner! 
You can make BIG money selling this incredible software too!
This is NOT a scheme or hype! It's the most advanced technology!

To burn:

http://www.dvdcopy.tv

To sell:

http://resell.dvdcopy.tv


*
This is a one-time mailing only for
those who are interested. No removal is
required. We applogize if this email
disturbed you.
*



-- 
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] Assistance Please - Two-Dimension Arrays

2001-09-22 Thread Jason G.

Mark,

PHP, at this point, does not support MultiDimension arrays.  However, you 
can get around this by placing array's inside arrays.

Thus:

$myarray[0] = array("element00", "element01","element02");
$myarray[1] = array("element10", "element11","element12");
$myarray[2] = array("element20", "element21","element22");

You would refrence "element11" by
$myarray[1][1];

Hope it helps!

-Jason Garber
deltacron.com


At 12:03 PM 9/23/2001 +0800, Mark van Proctor wrote:
>I'm trying to fill information that i read out of files into a 2 dimensional
>array.
>My main problem (i think) is that i dont know how to declare a 2 dimensional
>array prior to adding parts to it.
>Especially since the size of each internal array and the external array are
>all picked up from the files and read as strings - i'm not sure how to
>convert these to ints.
>
>I don't know how to test if the data is beign stored in the array because
>when i come out of the "entry" loop, the count() size of the array is 0.
>
>I'm very new at this so any help you can offer is greatly appreciated.
>
>Thanks,
>
>Mark
>
>
>
>--
>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] Multiple Arrays in OOP

2001-09-22 Thread Jamie Smith

hi I'm hoping that someone here can help me I'm totally new to object oriented 
stuff and might be trying to do this totally ass backwards.
Having said that this also involves multidimensional arrays and I'm not to bright with 
these either . :)

I have looked on the web and FAQ's and manuals for help  but havenot found anything 
that quite 
covers this in this ..so I hope It's not so obvious that noone else has ever asked 
this.
Thanks in advance.

What I am trying to make is just a small shopping type application. My idea is 
for an Item code , an option for the item and the number wanted to be sent to a Cart 
Class
and stored as an multi dimensional array that has structure like this :

($productid, ($option => $qty))  
so that $option is a string index of the "second" array

or visually like this I think :
|  Code1||Code 2   ||
| Option1 | Option2 || Option1 | Option2 | Option3 ||
|QTY   |QTY   ||QTY   |QTY  |   QTY||

What I am having problems with is setting the qty value correctly and updating it
Supposedly if you just keep hitting the update button then the qty should keep 
incrementing
but on the first run (for each code entered) it is zeroed ! and not 1 as is on the 
form .. after the first time all qty 
for options are set correctly, but I cannot figure out how to 'reach' into the array 
and update 
or even overwrite the values I am setting (overwriting is what I was expecting for the 
code below)


Thanks again 
Jamie Smith


CODE follows 
init();
   header("Location: $HTTP_REFERER");
  break;
  case "add" :
 $MYSESSION["cart"]->add($item_code, $form_qty, $option);
  default:
?>




  CODE : 
  Option:
A2
 A3
 A4
  Qty to add : 
  



\nClear All";
$itemarray = $MYSESSION["cart"]->items;
while (list ($code) = each ($itemarray)){
 echo "\nCode : $code\n\n";
 while(list($option,$qty) = each ($itemarray["$code"])){
  echo "Option = $option | QTY = $qty\n";
 }
 echo"";
}
?>


 $qty))*/

 function Cart() {
 /* object constructor */
  $this->init();
 }

 function init() {
 /* this function is called to initialize (and reset) the cart */
  $this->items = array();
 }

 function add(&$productid, $qty, $option) {
 /* add an item to the shopping cart and update the total price */
  if (isset($productid)) {
   if(!($option))$option=0;/*not all products will have multiple options and may be 
passed as $productid and $qty*/
   $productinfoarray = array ($option => 0);
   setdefault($this->items[$productid],$productinfoarray);
   /* echo "Submitted : ".$productid." ".$option." ".$qty; */
   $this->items[$productid] += array($option => $qty);
  }
 }
}
?>




[PHP] timeouts on loops

2001-09-22 Thread Evan Nemerson

Is there a way to put a timeout on each iteration of a loop (foreach, to be 
more specific)?

-- 
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] Create Array??

2001-09-22 Thread KPortsmout

Hi,

If I have a value $num = 32; based on this how can I create an Array of 
numbers 1 - 32, something like this...



Any suggestions?? I cannot use array_push as this has to work on a PHP3 
server.

TIA
Ade

-- 
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] Create Array??

2001-09-22 Thread Andrew Braund

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, 23 September 2001 15:39
> To: [EMAIL PROTECTED]
> Subject: [PHP] Create Array??
> 
> 
> Hi,
> 
> If I have a value $num = 32; based on this how can I create an Array of 
> numbers 1 - 32, something like this...
> 
>  $num = "32";

 $num = 32;
 $iary = array();

> for ($i = 1; $i <= $num; $i++)
> {

$iary[$i] = $i;
// if you actually wanted the array to contain "1" etc then try
// $iary[$i] = "\"$i\"";

> // Do something
> }

// And now $iary = ("1","2","3",etc

var_dump($iary);

> ?>
> 
> Any suggestions?? I cannot use array_push as this has to work on a PHP3 
> server.
> 
> TIA
> Ade
 

-- 
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] Create Array??

2001-09-22 Thread Evan Nemerson

/* Untested */
$num = 32;
$i=Array();
for($x=1;$x<=$num;$x++) {
$temp[$x]=0;
};
$i=array_keys($temp);
unset($temp);


On Saturday 22 September 2001 23:09, you wrote:
> Hi,
>
> If I have a value $num = 32; based on this how can I create an Array of
> numbers 1 - 32, something like this...
>
>  $num = "32";
> for ($i = 1; $i <= $num; $i++)
> {
> // Do something
> }
> // And now $i = ("1","2","3",etc
> ?>
>
> Any suggestions?? I cannot use array_push as this has to work on a PHP3
> server.
>
> TIA
> Ade

-- 
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] http authentication and php

2001-09-22 Thread Evan Nemerson

if you just want to output the file to the user, 
readfile("http://server.com/greendocks/locked/useradd.htm?user=blah&pass=blah";); 
should work. If you want to play with the file first, file() will put it in 
an array, fopen() will create a file pointer to it, you could create your 
very own HTTP session (if you know the protocol) with fsockopen()... i'm sure 
there are more, but that's all you need (probably). I would probably use this:

$file=implode("\n",file("http://server.com/greendocks/locked/useradd.htm?user=blah&pass=blah";));

if i wanted to place the whole thing in one variable, not an array.



On Saturday 22 September 2001 20:39, you wrote:
> I am trying to write a php script that will work around a http
> authentication that I do have access to. I am trying to do this so that a
> form process in my control panel can automatically have information sent to
> it from a form that a user will fill out. However, my problem is in trying
> to get PHP to automatically authenticate.
>
>
> for example:  I want to be able to call a url like this: 
> http://server.com/greendocks/locked/useradd.htm?user=blah&pass=blahbut
> this url is behind a http authentication.  Is it possible to have this url
> called by a php script?
>
> And the second part of the question is can I do this process so it is
> completely invisible to the user that this page has been called? Because of
> course I don't want to allow users to have access to everything in my
> control panel.
>
> Hopefully someone knows what I'm getting at. Thanks for any help you may be
> able to provide.
>
> Jeff

-- 
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] Create Array??

2001-09-22 Thread Evan Nemerson

$i=Array(); would probably be better as $temp=Array(); although i THINK 
either one is redundant...

sorry

> /* Untested */
> $num = 32;
> $i=Array();
> for($x=1;$x<=$num;$x++) {
>   $temp[$x]=0;
> };
> $i=array_keys($temp);
> unset($temp);
>
> On Saturday 22 September 2001 23:09, you wrote:
> > Hi,
> >
> > If I have a value $num = 32; based on this how can I create an Array of
> > numbers 1 - 32, something like this...
> >
> >  > $num = "32";
> > for ($i = 1; $i <= $num; $i++)
> > {
> > // Do something
> > }
> > // And now $i = ("1","2","3",etc
> > ?>
> >
> > Any suggestions?? I cannot use array_push as this has to work on a PHP3
> > server.
> >
> > TIA
> > Ade

-- 
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] Strange output by phpinfo()

2001-09-22 Thread Evan Nemerson

That is interesting. Code Red II doesn't trojan browsers, does it??? Hmm 
that's an interesting idea... Are you using a (malicious) proxy server?

That's all I can come up with...




On Saturday 22 September 2001 18:50, you wrote:
> While viewing my phpinfo() page, i got this:
>
> QUERY_STRING
> 
> 
> 
> %u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucb
> d3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u%u00
> =a
>
> REQUEST_URI
> /default.ida?XXX
> 
> 
> X%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9
> 090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0
> 078%u%u00=a
>
> Of course I wasn't using this query for my phpinfo() page. Where did PHP
> get this information from? This info was under the header "Environment"
> Not that I have any troubles with this, but it seems weird to me.
>
> Thanks,
>
> Jeroen
>
> Ps. Of course I know what that QUERY is, but why is it in my phpinfo()
> output when I didn't use that query?

-- 
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] http authentication and php

2001-09-22 Thread Jeff Brtistow

Well the actual problem is that this file is behind a http authenticated
directory. I actually don't want the users to know the login and password
for it since it is the login for my control panel for my website. However, I
do want to be able to execute a url, this is to allow users to create their
own email addresses with pop access without requesting them from me all the
time.

I am just not sure if I can push the login and password for the
authentication window that would normally pop up, so the file is executed
behind the scenes, and the user would merely see a output of their username
and password and information on how to login to their account which would be
output as long as the file was able to be executed.

Any ideas?

"Evan Nemerson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> if you just want to output the file to the user,
>
readfile("http://server.com/greendocks/locked/useradd.htm?user=blah&pass=bla
h");
> should work. If you want to play with the file first, file() will put it
in
> an array, fopen() will create a file pointer to it, you could create your
> very own HTTP session (if you know the protocol) with fsockopen()... i'm
sure
> there are more, but that's all you need (probably). I would probably use
this:
>
>
$file=implode("\n",file("http://server.com/greendocks/locked/useradd.htm?use
r=blah&pass=blah"));
>
> if i wanted to place the whole thing in one variable, not an array.
>
>
>
> On Saturday 22 September 2001 20:39, you wrote:
> > I am trying to write a php script that will work around a http
> > authentication that I do have access to. I am trying to do this so that
a
> > form process in my control panel can automatically have information sent
to
> > it from a form that a user will fill out. However, my problem is in
trying
> > to get PHP to automatically authenticate.
> >
> >
> > for example:  I want to be able to call a url like this:
> > http://server.com/greendocks/locked/useradd.htm?user=blah&pass=blah
but
> > this url is behind a http authentication.  Is it possible to have this
url
> > called by a php script?
> >
> > And the second part of the question is can I do this process so it is
> > completely invisible to the user that this page has been called? Because
of
> > course I don't want to allow users to have access to everything in my
> > control panel.
> >
> > Hopefully someone knows what I'm getting at. Thanks for any help you may
be
> > able to provide.
> >
> > Jeff



-- 
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] Create Array?? More

2001-09-22 Thread KPortsmout

Ok, 

Thanks for the input, unfortunately it didn't help me solve my overall 
problem, so I will post that and see if anyone has any suggestions...

I am basically displaying the Usernames from a .htpasswd file like this...

$File="$Path$Directory1/.htpasswd";
$fd = fopen ($File, "r");
$Content = fread ($fd, filesize ($File));
$Content=ereg_replace ("\n",":", $Content);
// Explode the file using : as seperator
$MyContent = explode (":", $Content);
// Count it up
$LoU = count($MyContent)-1;
// Close the File
fclose($fd);

for ($a=0; $a < $LoU; $a+=2)
{
printf("\n%s%s", $MyContent[$a], $MyContent[$a+=2]);
}

This is working perfectly, but what I would like to do is display a number 
next to each one, at the moment it displays...

UserName1   UserName2
UserName3   UserName4

What I would like it to do is

1. UserName1   2. UserName2
3. UserName3   4. UserName4

I cannot figure a way to use $a because it has to skip by 2 in order not to 
display the encrypted passwords..any suggestions???

TIA
Ade

-- 
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]