[PHP] draw image graph with uptime command

2002-01-03 Thread Daniel Masur

what i want to do is, parsing the "uptime" command in suse, get the stats
for 1, 5 and 15 minute cpu utilisation, and draw an image.

just like the taskmanager in win windows 2000, xp, and nt.anybody did this
before?

should look like this:
  /
|    /
|/\/
|___/\/
|  /
|/__
uptime: 68days


parsing the uptime command, isnt a problem, but how to coordinate the 3
values in the image.

also i have the ability, to save all values in a mysql db.

anybody can help?

ps, i never worked with images in php before...





-- 
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] binary data - MSSQL

2002-01-09 Thread Daniel Masur

are you shure about putting binarydata into a database?

cant you do it with links?
performance would be better this way i think.

"Henning Sprang" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hy Peter,
>
> Peter Lavender wrote:
>
> > Hi Everyone,
> >
> > I did ask this earlier, but I have made some head way since, but I'm
still
> > not sure that I have things right.
> >
> > What datatype should I use for zip files?
>
>
> You should use the blob type therefore
>
>
> >
> > How do I create a link to a file to be downloaded from the database?
>
>
> first you need a php script that pulls the data out of the database and
> echoes an appropriate header, and after this all the binary data of your
> file, you would then link it and give the id or whatever you use to
> identify it in the database as parameter to this script.
>
>
> >
> > All the examples I have read all relate to images, which hasn't really
> > helped.
>
>
> it's exactly the same with zips as with images, the only difference is
> the header for the mime type which is "image/gif" for gif's and
> "application/zip" for zips
> If you already know everything for images out oif a Mysql, then i don't
> tell it again here - ask if you still have problems!
>
> henning
>
>
>
>
>



-- 
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: Web portals

2001-10-19 Thread Daniel Masur

would intresst me too, cose i want to biuld my own portal

<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> schrieb im Newsbeitrag
20011018124135.17694.1001.qmail@server0021">news:20011018124135.17694.1001.qmail@server0021...
>
> Hi !
>
> I am looking for an efficient web portal, sutable for medium/big
corporation
> sites, with a searcable product catalog etc. The catalog is the main
> emphasis of the site.
>
> One more thing :
> Is there a tutorial or an article that covers the web portal building ?
>
> 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: apache + ftp!

2001-11-12 Thread Daniel Masur

on win32 i like g6ftp server

"Benjamin" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hey group!
>
> i have apache installed on an win2000 machine and now i need an good and
> stable ftp server! which one does i take!
>
> thank you, ben
>
>
>



-- 
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] apache + ftp!

2001-11-12 Thread Daniel Masur

never had it runnin, but i didnt heard bout hacking g6ftp.

"Olexandr Vynnychenko" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello Benjamin,
>
> Monday, November 12, 2001, 12:00:22 PM, you wrote:
>
> B> hey group!
>
> B> i have apache installed on an win2000 machine and now i need an good
and
> B> stable ftp server! which one does i take!
>
> B> thank you, ben
>
> And what about W2k's built-in FTP server? Has someone used it? Is it
> so bad?
>
> --
> Best regards,
>  Olexandrmailto:[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] can php detect whether an email address is a valid one?

2001-11-13 Thread Daniel Masur

get the mx record:


function checkmail ($mailtocheck) {
if (eregi("^[_\.0-9a-z-]+@([0-9a-z][-0-9a-z\.]+)\.([a-z]{2,3}$)",
$mailtocheck, $check))
{
if (getmxrr($check[1].".".$check[2],$temp))
{
return true;
}
return false; // kein mx gefunden
}
else
{
return false; // syntax fehler
}
}


"Martin Towell" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You can set the "Error-To: " header to some email address that runs a
script
> to remove the email address - other that that, no, not that I know of.
>
> -Original Message-
> From: Alex Chau [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 14, 2001 1:31 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] can php detect whether an email address is a valid one?
>
>
> I have a php script sending newsletter to a mailing list time by time,
> but some emails are no longer exist, so I need to remove them manually.
> Can php detect whether an email address is a valid one, then remove it
> from the list automatically? no matter before or after the newsletter
> has sent.
>
> Thanks in advance.
>
>
>
> --
> 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] Re: Login/Security Problem

2001-11-14 Thread Daniel Masur

set a cookie, and delete it with a logout button or when the user leaves
your domain


"Joe Van Meer" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there. I'm new to php and would like some insight on securing a
website.
> Upon successful login to my site (checks against database for username and
> password) I assign a session variable called '$islogged' to 'yes'. On all
> other pages throughout my site I use the following code to determine if
this
> variable is set, and if not redirect them to the login page.
>
> if($islogged = = "no"){
>
> header("Location:index.php");
> }
> elseif(EMPTY($islogged))
> {
> header("Location:index.php");
> }
>
>
> This seems to work, however, if I close out my browser and say type in
> main.php (this page has the above code) in the address bar I can still
> access the page. How can I fix this? Is there something else I could be
> doing to improve the functionality?
> Any insights would greatly be appreciated.
>
> Cheers Joe:)
>
>



-- 
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: Login/Security Problem

2001-11-14 Thread Daniel Masur

so set an md5() of each user name as "yes".
islogged=Ehyfoa74a23gfd
or whatever is good i think. but sessions are the most secure way, so think
about both (sessions and cookies) and decide what you really need.

you have linux?
you could make an .htaccess, and make real users with no bash, and let them
login with real usernames and passwords.

windows?
on win2k you could do this too. but be shure to not grant access to local
hd's. major security risk...

"Stefan Rusterholz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
009f01c16d13$bfd6b4d0$3c01a8c0@quasimodo">news:009f01c16d13$bfd6b4d0$3c01a8c0@quasimodo...
> I don't think this is a secure method.
> If I do only a little effort an find out, that it's this variable
$islogged
> which has to set to "yes" (or whatever) I can gain access by simply typing
> into the browsers addressbar
> "www.yourdomain.com/theFileIWantToGo.php?islogged=yes" and I will gain
> access.
>
> I'm sorry, but I can't tell you a better way to do it.
>
> Stefan Rusterholz, [EMAIL PROTECTED]
> --
> interaktion gmbh
> Stefan Rusterholz
> Zürichbergstrasse 17
> 8032 Zürich
> --
> T. +41 1 253 19 55
> F. +41 1 253 19 56
> W3 www.interaktion.ch
> --
>
> - Original Message -
> From: "Daniel Masur" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, November 14, 2001 2:33 PM
> Subject: [PHP] Re: Login/Security Problem
>
>
> > set a cookie, and delete it with a logout button or when the user leaves
> > your domain
> >
> >
> > "Joe Van Meer" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hi there. I'm new to php and would like some insight on securing a
> > website.
> > > Upon successful login to my site (checks against database for username
> and
> > > password) I assign a session variable called '$islogged' to 'yes'. On
> all
> > > other pages throughout my site I use the following code to determine
if
> > this
> > > variable is set, and if not redirect them to the login page.
> > >
> > > if($islogged = = "no"){
> > >
> > > header("Location:index.php");
> > > }
> > > elseif(EMPTY($islogged))
> > > {
> > > header("Location:index.php");
> > > }
> > >
> > >
> > > This seems to work, however, if I close out my browser and say type in
> > > main.php (this page has the above code) in the address bar I can still
> > > access the page. How can I fix this? Is there something else I could
be
> > > doing to improve the functionality?
> > > Any insights would greatly be appreciated.
> > >
> > > Cheers Joe:)
> > >
> > >
> >
> >
> >
> > --
> > 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] format output from exe()

2001-12-05 Thread Daniel Masur

how can i format the output from:

$who = passthru(system(who));
echo $who;

it doesnt put breakes behind each line, so all the stuff iss just one line
till the browsers to short...

anybody can help?



-- 
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] format output from exe()

2001-12-05 Thread Daniel Masur

worked wunderfull.

thx


"Tyler Longren" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
005101c17d89$42085b40$0101a8c0@Longren">news:005101c17d89$42085b40$0101a8c0@Longren...
> Hello,
>
> I did this once with ping:
> exec("ping -c $count $host", $result);
>  for ($i=0; $i < count($result); $i++) {
>   $data .= "$result[$i]";
>  }
> print "$data";
>
> That might work for ya.
>
> Good luck,
> Tyler Longren
>
> - Original Message -
> From: "Daniel Masur" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 05, 2001 5:50 AM
> Subject: [PHP] format output from exe()
>
>
> > how can i format the output from:
> >
> > $who = passthru(system(who));
> > echo $who;
> >
> > it doesnt put breakes behind each line, so all the stuff iss just one
line
> > till the browsers to short...
> >
> > anybody can help?
> >
> >
> >
> > --
> > 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] Re: Access denied for user

2001-12-06 Thread Daniel Masur

you didnt entered the correct pasword for the mysql database



"Josep" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000501c17e48$3d5acaf0$[EMAIL PROTECTED]">news:000501c17e48$3d5acaf0$[EMAIL PROTECTED]...
> I get the following message when trying to view a php page
>
> Warning: Access denied for user: 'jupshoes@localhost' (Using password:
YES)
> in /home/jupshoes/public_html/guest/index.php on line 27
> Unable to connect to SQL server
>
> What is going wrong
>
> Josep
>



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

2001-12-20 Thread Daniel Masur

my logout.php looks like this


session_start();
session_register("SESSION"); //these 2 things have to be on every page
right?
require ('validate_session.php'); //does compare $PHPSESSID and the sessid i
have in every url

// start of validate_session.php
 ";
 exit;
 }
 ?>
// end of validate_session.php

session_destroy();
session_unregister("SESSION");
session_unset("SESSION");
session_write_close();


but the session wont leave. i can browse to other sides, but i can comeback
later, and i get the same session id...

what is wrong?




-- 
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 body flood mypage how can I prevent them ?

2001-12-21 Thread Daniel Masur

at least you have to tell what is getting flooded...
db?
apache?
logs?
pings?


"Alawi" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
00cd01c18a1a$05063440$b084a2d4@mcsh2l7jqy8bgj">news:00cd01c18a1a$05063440$b084a2d4@mcsh2l7jqy8bgj...
some body flood mypage how can I prevent them ?





-- 
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: newby: forms problem

2001-09-04 Thread Daniel Masur

just post your form to a ph site, and the name describt in your  tag
will be the variable.


is
$wtf
on the php page

"Nikola Veber" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi
>
> In order to process a form, do I need a cgi script and if not, how am I
suposed to do that (how to pass a field value into a
> $variable, or there is another method)?
>
>



-- 
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: image problem

2001-09-05 Thread Daniel Masur

what u use for browser, os on the client machine?

maybe some cache problem
maybe timeout

post the url of that page...so that ppl can look @ it, and tell what s going
on.


<[EMAIL PROTECTED]> schrieb im Newsbeitrag
008b01c135da$dc06f270$[EMAIL PROTECTED]">news:008b01c135da$dc06f270$[EMAIL PROTECTED]...
I'm not sure if this is a problem with my php coding or html or the server
or what, but I made a simple photo album that just basically lets users add
a pic of themselves through a form and it records the url of their pic in a
sql db and then i just display it on a page. Now the problem is only some
pictures show up. Half are red x's and when i hit 'show picture' they still
don't show up, yet when i click properties, copy the source of the image,
and go to the source it shows up. Any idea what this is?
THANKS!




-- 
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: Searching help

2001-09-05 Thread Daniel Masur

$Query = "SELECT * FROM enet WHERE TechContact LIKE '%$Avar1%' AND
AdminContact LIKE '%$Avar2%'";

try this. Avar1/2 needs to be replaced by your var that u use in your html
form


"Devon" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> $Query = "SELECT * FROM enet WHERE TechContact LIKE '%' AND AdminContact
> LIKE '%'";
>
> This query simply prints out my entire tables, is there a way using PHP so
I
> can make the '%' a user input so they can search the table under those
> fields.
>
> Cheers
>
>
>
>



-- 
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: Question.

2001-09-06 Thread Daniel Masur

echo $os\n;
"\n" does a "newline" in php, that u only will see in your sourcecode

or
echo "$os\n\n";
will do a brake in the source, and one in online layout


better read php.net first, before posting suh stuff here.

"Johan Vikerskog" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]..
.
> ok i have this:
>  include "../config.php";
>
> $result = mysql_query("SELECT os from sdb_entries");
>
> while($row=mysql_fetch_array($result))
>
> {
> $os = $row["os"];
> echo $os;
> }
>
> ?>
>
> Now i want the echo to make a new line instead of putting everything into
one large chunk.
> Help?!?
>
> //Johan the senile
>
> -Original Message-
> From: _lallous [mailto:[EMAIL PROTECTED]]
> Sent: den 6 september 2001 12:44
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Question.
>
>
> how you mean it/be more specific?
>
> while (list(, $value) = each($array))
> {
>echo "value = $value\n";
> }
> "Johan Vikerskog" <[EMAIL PROTECTED]> wrote in message
>
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]..
> .
> > I have done this before but my memory fails me.
> >
> > I am trying to just loop threw ny array and display it.
> > one row per result.
> > How do you do that again?
> >
> > //Johan
>
>
>
> --
> 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] searching trought multiple tables

2001-09-17 Thread Daniel Masur

i have a mysql database with 100 entrys in 3 tables.

i need to search trought them, but if i search for 'a' in all tables, i get
5000 results...

70 results are the same.

heres my code:
$sql_find="
SELECT
 mieter.miet_name, mieter.cat_id, mieter.id,
mieter.miet_beschreibung, cat.cat_name, events.name
FROM
 mieter AS mieter,
 categories AS cat,
 events AS events
WHERE
mieter.miet_name LIKE '%$words%'";
if($option1) $sql_find = $sql_find . " AND mieter.cat_id = '$option1'";
$sql_find = $sql_find . " OR mieter.miet_beschreibung LIKE '%$words%'";
$sql_find = $sql_find . " or events.name LIKE '%$words%'";

with $option1 enabled you can search trought subcategories. can anybody help
me?



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