Re: [PHP] testing

2001-07-05 Thread ReDucTor

I'm on my way to Mars atm...
- Original Message - 
From: McShen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 06, 2001 1:09 PM
Subject: [PHP] testing


 where are u guys?
 
 
 
 -- 
 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] Document File Types/Formats

2001-07-04 Thread ReDucTor

Hey,
  Just wonder if some one has any documents/guides on different file types, i saw one 
a while ago on WRI(Mircosoft Word) files, Currently i only have normal text, I know 
can do HTML so don't sent me documents on converting HTML to Text, just other file 
typesplease...WRI is one of the main ones i want, also PDF if any one has details 
on it...
  - James ReDucTor Mitchell



Re: [PHP] Security of PHP code

2001-07-04 Thread ReDucTor

http://sourceforge.net/source.php?page_url=/source.php look at that...
- Original Message -
From: PHPBeginner.com [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; php-general [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 12:08 AM
Subject: RE: [PHP] Security of PHP code


 SECURE, SECURE.

 It is not how secure PHP is, it is how well YOU protect it.
 For example = make this line show_source($file); then go to your page like
 file.php?file=/etc/passwd and you're freaked!

 There is a whole bunch of way to hack your pages if not protected well
 enough, but PHP itself has no vital security problems.

 Try to search the archives for this topic and see what people
think/suggest.
 You will find there thousands of tips on what to do to have a bullet-proof
 website. (always of the server is yours).


 Sincerely,

  Maxim Maletsky
  Founder, Chief Developer

  PHPBeginner.com (Where PHP Begins)
  [EMAIL PROTECTED]
  www.phpbeginner.com




 -Original Message-
 From: David A Dickson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 04, 2001 10:43 PM
 To: php-general
 Subject: [PHP] Security of PHP code


 Is it possible for others to view the php code for pages I have written? I
 thought I heard someone say before that they could write a simple script
to
 accomplish this. If anyone knows of any tacticts people might use to
attack
 my code please post them hee.

 : David A. Dickson
 : [EMAIL PROTECTED]




 Get 250 color business cards for FREE!
 http://businesscards.lycos.com/vp/fastpath/

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



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



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




[PHP] Division Problems

2001-07-04 Thread ReDucTor

Hey, I made this little script, quiet useful on windows and unix machines, but i have 
a problem, division isn't returning a float, it just returns 0, would i need to do 
something like convert $totalsize into a float?
html
body?php
$SecondsToTimeout = 120;
ini_alter(max_execution_time, $SecondsToTimeout);
function convert($bytes)
  {
   $kbytes = $bytes / 1024;
   $mbytes = $kbytes / 1024;
   $gbytes = $mbytes / 1024;
   $tbytes = $gbytes / 1024;

   return $mbyte;
  }
function showdir($dir)
  {
 echo blockquote;
 $handle = opendir($dir);
   while (false!==($file = readdir($handle)))
   { 
if ($file != .  $file != ..)
{ 
 if(is_file($dir./.$file)){
 // Commented out for fixing this error
 // echo $file. (i.filesize($dir./.$file). 
Bytes/i)(i.filetype($dir./.$file)./i)(i.fileperms($dir./.$file)./i)br\n;
 }
 if(is_dir($dir./.$file)){
  $dirhandle = opendir($dir./.$file);
  while(false!==($filetocheck=readdir($dirhandle))){
   if(!isset($totalsize))
$totalsize = filesize($dir./.$file./.$filetocheck);
   else
$totalsize = $totalsize + filesize($dir./.$file./.$filetocheck);
  }
  echo $file. (i.convert($totalsize)./i)br\n;
  showdir($dir...$file); // Put / on unix, and c:/ on windows
 }
  }
  }
   echo /blockquote;
  }
  showdir(/);
ini_restore(max_execution_time);
?/body/html



[PHP] Want to know what people think of my little script(Great for Personal and Pro Use)

2001-07-04 Thread ReDucTor

Hey,
   First off grab the Developer Timer from 
http://newbienetwork.net/phpcodems.php?as=viewcodeid=7 thats a great little class, 
then make a .php file and paste the following in

html
body?php
include(class.timer.php);
$timer = new timer(viewfiles);
$timer-start_timing();
$SecondsToTimeout = 120;
$foldertoview = .;
ini_alter(max_execution_time, $SecondsToTimeout);
function convert($bytes, $conversion)
  {
   $kbytes = $bytes / 1024;
   $mbytes = $kbytes / 1024;
   $gbytes = $mbytes / 1024;
   $tbytes = $gbytes / 1024;

   if($conversion == bytes)
return round($bytes,4). Bytes;
   if($conversion == kbytes)
return round($kbytes,3). Kb;
   if($conversion == mbytes)
return round($mbytes,2). Mb;
   if($conversion == gbytes)
return round($gbytes,2). Gb;
   if($conversion == tbytes)
return round($tbytes,3). Tb;
  }
function showdir($dir, $mode)
  {
 echo blockquote;
 $handle = opendir($dir);
   while (false!==($file = readdir($handle)))
   { 
if ($file != .  $file != ..)
{ 
if($mode == 1){
  if(is_file($dir./.$file)){
  // Commented out for fixing this error
   echo $file. 
(i.convert(filesize($dir./.$file),mbytes)./i)(i.filetype($dir./.$file)./i)(i.fileperms($dir./.$file)./i)br\n;
  }
 }
 if(is_dir($dir./.$file)){
  $dirhandle = opendir($dir./.$file);
  while(false!==($filetocheck=readdir($dirhandle))){
   if(!isset($totalsize))
$totalsize = filesize($dir./.$file./.$filetocheck);
   else
$totalsize = $totalsize + filesize($dir./.$file./.$filetocheck);
  }
  if($mode == 1){
   echo a name=\.realpath($dir./.$file).\b\\.$file./b/a 
(i.convert($totalsize,mbytes)./i)br\n;
   showdir($dir./.$file, 1);
  }
  if($mode == 0){
   echo a href=\#.realpath($dir./.$file).\b\\.$file./b/a 
(i.convert($totalsize,mbytes)./i)br\n;
   showdir($dir./.$file, 0);
  }
 }
  }
  }
   echo /blockquote;
  }
  showdir($foldertoview, 0);
  ?brbrbrbrbr?php
  showdir($foldertoview, 1);
ini_restore(max_execution_time);
$timer-stop_timing();
$timer-print_runtime();
?/body/html

Now change the $foldertoview to any folder, if you want to know the total of your 
system, put it as / that should work in unix and windows, hell i tested that on win98 
systemits great, every place that wants to know where its space is going should 
have it, even a little person computer should have it to see whats going where...hehe

Tell me what you think...
- James ReDucTor Mitchell



Re: [PHP] Basic fopen() question

2001-07-04 Thread ReDucTor

file() http://php.net/file
- Original Message -
From: JCampbell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 10:48 AM
Subject: [PHP] Basic fopen() question


 I had an example of a function to open a file and read its contents into
an
 array. It worked so that each line of the file was one element of the
array.
 I can't find my example, nor can I get it to work the way I'd like. Any
 help?


 =-
 Jonathan Campbell ( [EMAIL PROTECTED] )

 Mid days haze and I'm still not awake
 I got everything going but my bills are still late
 Funnier than hell and I think it's a blast
 Life's like a laugh when you got no money

 Lyrics from Average Day by Aztek Trip ( http://www.aztektrip.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] Free logo shirt for your school, camp or sports team

2001-07-03 Thread ReDucTor

Is this only for the first shirt, all for every shirt?
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 04, 2001 2:25 PM
Subject: [PHP] Free logo shirt for your school, camp or sports team



 Free logo shirt for your school, camp or sports team


 Your own logo printed on top quality shirts for only $3.99 each!

 Our custom shirts nomally sell for $7.95 a piece.
 But with this limited offer you get them for half price.

 No other shirt printing company can even come close to matching our
prices!

 Email or Call NOW and we will send you our Famous White Tiger Tee!

 Mailto:[EMAIL PROTECTED]

 White Tiger Tees
 (850) 421-5377


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



-- 
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] Can any one spot the Parse error Here

2001-07-02 Thread ReDucTor

Hey,
Right at the end i get a prase error, which i figure i have missed a
break; or a }
but i just can't seem to find it, can some one look thro it, tell me if they
spot it?

My Code:

?php
   $usersfile = users.php;
   session_start();
   session_register(user,pass);
   if(isset($user))
   $username = $user;
   if(isset($pass))
   $password = $pass;
   if(!$username)
   {
?
form
 User : input type=text name=usernamebr
 Password : input type=password name=passwordbr
 input type=submit value=Login
/form
?php
   }
   else
   {
$user = $username;
$pass = $password;
$userslist = file($usersfile);
for($i = 1; $i  sizeof($userslist); $i++)
{
 $userline = explode(||, $userslist[$i]);
 if($usersline[0] == $username)
 {
  if($password != rtrim($usersline[1]))
  {
   die(Incorrect Username);
  }
  else
  {
   $i = sizeof($userslist) + 1;
  }
 }
}
if(!$action)
 $action = main;
switch($action){
 case main:
?
a href=?action=postPost News/abr
a href=?action=editEdit News/abr
a href=?action=deleteDelete News/abr
  a href=?action=adduserAdd User Account/abr
  a href=?action=deluserDelete User/a
  ?php
   break;
case adduser:
   ?
  form
  input type=hidden name=action value=process
  input type=hidden name=process value=adduser
  Username : input type=text name=unamebr
  Password : input type=password name=pwordbr
  input type=submit value=Add User
   /form
  ?php
  break;
 case deleteuser:
  $userslist = file($usersfile);
 for($i = 0; $i  sizeof($userslist); $i++)
{
   $userline = explode(||, $userslist[$i]);
   echo a href=\?action=processprocess=deluseruname=;
   echo $userline[0]..$userline[0]./abr;
  }
  break;
 case post:
  ?
  form
  input type=hidden name=action value=process
  input type=hidden name=process value=post
  Title : input type=text name=titlebr
  textarea name=text/textareabr
  input type=submit value=Post
  /form
  ?php
  break;
  case edit:
   $dir = dir(./news);
  while($file=$dir-read())
   {
   if(is_file(./news/.$file))
   {
  $name = str_replace(.txt, , $file);
  echo a href=\?action=processprocess=viewnews=;
  echo $file.\.$name./a;
   }
  }
  $dir-close();
  break;
   case delete:
 $dir = dir(./news);
  while($file=$dir-read())
   {
  if(is_file(./news/.$file))
  {
  $name = str_replace(.txt, , $file);
  echo a href=\?action=processprocess=confimnews=;
  echo $file.\.$name./a;
  }
  }
  $dir-close();
  break;
   case process:
  switch($process){
case adduser:
  $fp = fopen($usersfile, w);
   for($i = 0; $i  sizeof($userslist); $i++)
   fwrite($fp, $userslist[$i]);
  fwrite($fp, \r\n.$uname.||.$pword);
  fclose($fp);
  echo bUser Added!/b;
  break;
 case deluser:
  $fp = fopen($usersfile, w);
   for($i = 0; $i  sizeof($userslist); $i++)
 {
   $userdetails = explode(||, $userslist[$i]);
   if($userdetails[0] != $uname)
   fwrite($fp, $userslist[$i]);
  }
  fclose($fp);
  echo bUser Deleted!/b;
  break;
 case post:
  $fp = fopen(./news.$title..txt, w);
fwrite($fp, $title.\r\n);
  fwrite($fp, $text);
  echo bNews Posted!/b;
  break;
 case view:
  $newsdata = file(./news/.$news);
 $title = rtrim($newsdata[0]);
  echo Title: b.$title./b?
  br
  form
   input type=hidden name=process value=post
   input type=hidden name=action value=process
   input type=hidden name=tittle value=?php
 echo $tittle; ?
  textarea name=text
   ?php
for($i = 1; $i  sizeof($newsdata); $i++)
{
   echo $newsdata[$i];
}
   ?
   /textarea
   input type=submit value=Edit
  /form
  ?php
  break;
 case confirm:
  ?
  form
 input type=hidden name=process value=complete
   input type=hidden name=action value=process
 input type=hidden name=news value=?php
   echo $news; ?
bAre you Sure?/bbr
  input type=submit value=Yes
  /form
  form
  input type=submit value=No
  /form
  ?php
  break;
 case complete:
 unlink(./news/.$news);
 echo Don't Blame me, you Clicked Yes!;
break;
   }
}
?

I should test it every step, insted of just typing it up, then testing it
after...
   - James ReDucTor

Re: [PHP] Can any one spot the Parse error Here

2001-07-02 Thread ReDucTor

Only typed it up in like 20 min, i normaly do that after :)
- Original Message -
From: Andrew Halliday [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 5:26 PM
Subject: Re: [PHP] Can any one spot the Parse error Here


 Brace count mismatch.
 You are missing a '}'.
 God knows where it is...inconsistent spacing and code too lengthy.
 Functionise/objectise your code!

 AndrewH

 - Original Message -
 From: ReDucTor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 4:17 PM
 Subject: [PHP] Can any one spot the Parse error Here


  Hey,
  Right at the end i get a prase error, which i figure i have missed a
  break; or a }
  but i just can't seem to find it, can some one look thro it, tell me if
 they
  spot it?
 
  My Code:
  
  ?php
 $usersfile = users.php;
 session_start();
 session_register(user,pass);
 if(isset($user))
 $username = $user;
 if(isset($pass))
 $password = $pass;
 if(!$username)
 {
  ?
  form
   User : input type=text name=usernamebr
   Password : input type=password name=passwordbr
   input type=submit value=Login
  /form
  ?php
 }
 else
 {
  $user = $username;
  $pass = $password;
  $userslist = file($usersfile);
  for($i = 1; $i  sizeof($userslist); $i++)
  {
   $userline = explode(||, $userslist[$i]);
   if($usersline[0] == $username)
   {
if($password != rtrim($usersline[1]))
{
 die(Incorrect Username);
}
else
{
 $i = sizeof($userslist) + 1;
}
   }
  }
  if(!$action)
   $action = main;
  switch($action){
   case main:
  ?
  a href=?action=postPost News/abr
  a href=?action=editEdit News/abr
  a href=?action=deleteDelete News/abr
a href=?action=adduserAdd User Account/abr
a href=?action=deluserDelete User/a
?php
 break;
  case adduser:
 ?
form
input type=hidden name=action value=process
input type=hidden name=process value=adduser
Username : input type=text name=unamebr
Password : input type=password name=pwordbr
input type=submit value=Add User
 /form
?php
break;
   case deleteuser:
$userslist = file($usersfile);
   for($i = 0; $i  sizeof($userslist); $i++)
  {
 $userline = explode(||, $userslist[$i]);
 echo a href=\?action=processprocess=deluseruname=;
 echo $userline[0]..$userline[0]./abr;
}
break;
   case post:
?
form
input type=hidden name=action value=process
input type=hidden name=process value=post
Title : input type=text name=titlebr
textarea name=text/textareabr
input type=submit value=Post
/form
?php
break;
case edit:
 $dir = dir(./news);
while($file=$dir-read())
 {
 if(is_file(./news/.$file))
 {
$name = str_replace(.txt, , $file);
echo a href=\?action=processprocess=viewnews=;
echo $file.\.$name./a;
 }
}
$dir-close();
break;
 case delete:
   $dir = dir(./news);
while($file=$dir-read())
 {
if(is_file(./news/.$file))
{
$name = str_replace(.txt, , $file);
echo a href=\?action=processprocess=confimnews=;
echo $file.\.$name./a;
}
}
$dir-close();
break;
 case process:
switch($process){
  case adduser:
$fp = fopen($usersfile, w);
 for($i = 0; $i  sizeof($userslist); $i++)
 fwrite($fp, $userslist[$i]);
fwrite($fp, \r\n.$uname.||.$pword);
fclose($fp);
echo bUser Added!/b;
break;
   case deluser:
$fp = fopen($usersfile, w);
 for($i = 0; $i  sizeof($userslist); $i++)
   {
 $userdetails = explode(||, $userslist[$i]);
 if($userdetails[0] != $uname)
 fwrite($fp, $userslist[$i]);
}
fclose($fp);
echo bUser Deleted!/b;
break;
   case post:
$fp = fopen(./news.$title..txt, w);
  fwrite($fp, $title.\r\n);
fwrite($fp, $text);
echo bNews Posted!/b;
break;
   case view:
$newsdata = file(./news/.$news);
   $title = rtrim($newsdata[0]);
echo Title: b.$title./b?
br
form
 input type=hidden name=process value=post
 input type=hidden name=action value=process
 input type=hidden name=tittle value=?php
   echo $tittle; ?
textarea name=text
 ?php
  for($i = 1

Re: [PHP] PHP Form (aka:Re: [PHP] Can any one spot the Parse error Here)

2001-07-02 Thread ReDucTor

Many of my other scripts i use functions, and classes, first time i used
cases and switchs..was fun but i still like to use loops and functions more
:) hehehee
- Original Message -
From: Andrew Halliday [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 6:29 PM
Subject: [PHP] PHP Form (aka:Re: [PHP] Can any one spot the Parse error
Here)


  Only typed it up in like 20 min, i normaly do that [code tidying] after
:)

 hehe tisk tisk...the merits of design havent been hammered through you
yet?
 you are lucky!!!

 But, this does raise an interesting issuegood PHP code structure/form.
 What do people consider good PHP form?

 Ive coded in both PHP and ASP and in both OO and function oriented.
 Ultimately, i find functionally oriented PHP to be the best ... what do
 other people think?

 AndrewH


 --
 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] Class/Func Librarys

2001-07-01 Thread ReDucTor

Hey,
 Just Wondering if any one knows, any sites that havea a function and/or class 
library on there site, for any thing? Might save some time if i find some functions 
and/or classes :)
 Come on might just be a function you put in a script you made, send them!!!

  - James ReDucTor Mitchell



Re: [PHP] Class/Func Librarys

2001-07-01 Thread ReDucTor

They need to add the header
reply-to: [EMAIL PROTECTED]
here :)
- Original Message -
From: power jessie [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 4:40 PM
Subject: RE: [PHP] Class/Func Librarys



 try the PHP Classes Repository site on
 http://phpclasses.upperdesign.com

 hope that helps!
 jessie

 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 8:29 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Class/Func Librarys


 Hey,
  Just Wondering if any one knows, any sites that havea a function
 and/or class library on there site, for any thing? Might save some time if
i
 find some functions and/or classes :)
  Come on might just be a function you put in a script you made, send
 them!!!

   - James ReDucTor Mitchell



-- 
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] Class/Func Librarys

2001-07-01 Thread ReDucTor

If you view the source of this email, you will see headers.
If there is a header reply-to: it will send replys to the email address
there
so you don't need to add [EMAIL PROTECTED] to the to: or cc:
- Original Message -
From: power jessie [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 4:49 PM
Subject: RE: [PHP] Class/Func Librarys



 what do you mean?

 -Original Message-
 From: ReDucTor [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 01, 2001 8:40 AM
 To: power jessie
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Class/Func Librarys


 They need to add the header
 reply-to: [EMAIL PROTECTED]
 here :)
 - Original Message -
 From: power jessie [EMAIL PROTECTED]
 To: ReDucTor [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 4:40 PM
 Subject: RE: [PHP] Class/Func Librarys


 
  try the PHP Classes Repository site on
  http://phpclasses.upperdesign.com
 
  hope that helps!
  jessie
 
  -Original Message-
  From: ReDucTor [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, July 01, 2001 8:29 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Class/Func Librarys
 
 
  Hey,
   Just Wondering if any one knows, any sites that havea a
function
  and/or class library on there site, for any thing? Might save some time
if
 i
  find some functions and/or classes :)
   Come on might just be a function you put in a script you made, send
  them!!!
 
- James ReDucTor Mitchell
 




-- 
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] Pricing Advice Needed

2001-07-01 Thread ReDucTor

I lost half this subject whilst i format'd
some one mind explaining what you are talking about with
your foos, bars, foobars, dofoos, etc :)
   - James ReDucTor Mitchell
- Original Message - 
From: Brad Hubbard [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Saturday, June 30, 2001 5:49 PM
Subject: Re: [PHP] Pricing Advice Needed


 On Fri, 29 Jun 2001 01:42, Thomas Deliduka wrote:
  You get paid more
  depending on your style:
 
  If ($foo == bar) {
  $dofoo = fobar($foo);
  } else {
  $dofoo = foobar($bar);
  }
 
  Or
  If ($foo == bar)
  {
  $dofoo = fobar($foo);
  }
  else
  {
  $dofoo = foobar($bar);
  }
 
 if( $foo == bar ) $dofoo = fobar( $foo ) else $dofoo = foobar($bar);
 
 I think I'm being exploited !   :-)
 
 Cheers,
 Brad
 
 -- 
 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] Website dealing with PHP image generation?

2001-07-01 Thread ReDucTor

shouldn't it be
$himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
not
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;

notice the first slash
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: Jon Yaggie [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 1:48 AM
Subject: RE: [PHP] Website dealing with PHP image generation?


 I have changed it to below but still get this error Warning: Supplied
 argument is not a valid Image resource in /home/hyrum/public_html/test.php
 on line 41 and that is the ImageCopy line:

 $image = ImageCreate(500, 70);
 $bg = ImageColorAllocate($image, 255, 255, 255);
 $blue = ImageColorAllocate($image, 0, 0, 255);
 $black = ImageColorAllocate($image, 0, 0, 0);
 $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 ImageRectangle($image, 0, 0, 500, 70, $white);
 ImageString($image, 4, 0, 0, $text, $blue);
 ImageString($image, 3, 0, 20, $title1, $black);
 ImageString($image, 3, 0, 35, $title2, $black);
 ImageString($image, 3, 0, 50, $title3, $black);
 ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

 ImagePNG($image, signature.png);
 ImageDestroy($image);

 Jeff

  -Original Message-
  From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 30, 2001 6:31 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
  Jeff,
 
  I am not extremely fimilar with this function.  However, I did
  notice you are copying your image at a width and height of 1x1.
  this is my guess as far as i know by default this pixels.  so the
  likehood you would see an image copied at 1x1 is rather low.
 
  but perhaps i am complete wrong . . .let us know.
 
  I am creating an image on the fly based on newest entries in one my
mySQL
  tables.  In this created image I am trying to add a small one to
  it.  Now I
  am TRYING to use the below code:
 
  $image = ImageCreate(500, 70);
  $bg = ImageColorAllocate($image, 255, 255, 255);
  $blue = ImageColorAllocate($image, 0, 0, 255);
  $black = ImageColorAllocate($image, 0, 0, 0);
  $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
  ImageRectangle($image, 0, 0, 500, 70, $white);
  ImageString($image, 4, 0, 0, $text, $blue);
  ImageString($image, 3, 0, 20, $title1, $black);
  ImageString($image, 3, 0, 35, $title2, $black);
  ImageString($image, 3, 0, 50, $title3, $black);
  file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)
 
  Imagepng($image, signature.png);
  ImageDestroy($image);
 
  Am I using ImageCopy incorrectly?  It doesn't put anything in the
  new image.
 
 
 


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

2001-07-01 Thread ReDucTor

Hey,
   A Site one of my sites is hosted on(H4P), with it's php, when there is an 
error, it just doesn't display the page, any one ever had this problem? I tried it on 
another server, removed the error works on both now, but i don't want to have to 
switch just to test it, so does any one know the problem? :)
   - James ReDucTor Mitchell

  P.S It's not my server, I didn't make it to it :) hehe



Re: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread ReDucTor

Try

$image = ImageCreate(500, 70);
$bg = ImageColorAllocate($image, 255, 255, 255);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = ImageColorAllocate($image, 0, 0, 0);
$himage=
ImageCreateFromGIF(/usr/hyrum/public_html/images/topics/hyrum.gif);
ImageRectangle($image, 0, 0, 500, 70, $white);
ImageString($image, 4, 0, 0, $text, $blue);
ImageString($image, 3, 0, 20, $title1, $black);
ImageString($image, 3, 0, 35, $title2, $black);
ImageString($image, 3, 0, 50, $title3, $black);
ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

ImagePNG($image, signature.png);
ImageDestroy($image);

- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:17 AM
Subject: RE: [PHP] Website dealing with PHP image generation?


 Tried with and without and no luck, it has me stumped :)

 Jeff

  -Original Message-
  From: ReDucTor [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, July 01, 2001 11:53 AM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] Website dealing with PHP image generation?
 
 
  shouldn't it be
  $himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
  not
  $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 
  notice the first slash
  - Original Message -
  From: Jeff Lewis [EMAIL PROTECTED]
  To: Jon Yaggie [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Monday, July 02, 2001 1:48 AM
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
   I have changed it to below but still get this error Warning: Supplied
   argument is not a valid Image resource in
  /home/hyrum/public_html/test.php
   on line 41 and that is the ImageCopy line:
  
   $image = ImageCreate(500, 70);
   $bg = ImageColorAllocate($image, 255, 255, 255);
   $blue = ImageColorAllocate($image, 0, 0, 255);
   $black = ImageColorAllocate($image, 0, 0, 0);
   $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
   ImageRectangle($image, 0, 0, 500, 70, $white);
   ImageString($image, 4, 0, 0, $text, $blue);
   ImageString($image, 3, 0, 20, $title1, $black);
   ImageString($image, 3, 0, 35, $title2, $black);
   ImageString($image, 3, 0, 50, $title3, $black);
   ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);
  
   ImagePNG($image, signature.png);
   ImageDestroy($image);
  
   Jeff
  
-Original Message-
From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 6:31 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Website dealing with PHP image generation?
   
   
Jeff,
   
I am not extremely fimilar with this function.  However, I did
notice you are copying your image at a width and height of 1x1.
this is my guess as far as i know by default this pixels.  so the
likehood you would see an image copied at 1x1 is rather low.
   
but perhaps i am complete wrong . . .let us know.
   
I am creating an image on the fly based on newest entries in one my
  mySQL
tables.  In this created image I am trying to add a small one to
it.  Now I
am TRYING to use the below code:
   
$image = ImageCreate(500, 70);
$bg = ImageColorAllocate($image, 255, 255, 255);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = ImageColorAllocate($image, 0, 0, 0);
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;
ImageRectangle($image, 0, 0, 500, 70, $white);
ImageString($image, 4, 0, 0, $text, $blue);
ImageString($image, 3, 0, 20, $title1, $black);
ImageString($image, 3, 0, 35, $title2, $black);
ImageString($image, 3, 0, 50, $title3, $black);
file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)
   
Imagepng($image, signature.png);
ImageDestroy($image);
   
Am I using ImageCopy incorrectly?  It doesn't put anything in the
new image.
   
   
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
 
 
 


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



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




Re: [PHP] Website dealing with PHP image generation?

2001-07-01 Thread ReDucTor

No Problem
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: ReDucTor [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:48 AM
Subject: RE: [PHP] Website dealing with PHP image generation?


 I used ImageCreateFromPNG and it worked great!  Thanks a lot!  GIF wasn't
 supported (due to GD 1.6+).

 Jeff

  -Original Message-
  From: ReDucTor [mailto:[EMAIL PROTECTED]]
  Sent: Sunday, July 01, 2001 12:38 PM
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] Website dealing with PHP image generation?
 
 
  Try
 
  $image = ImageCreate(500, 70);
  $bg = ImageColorAllocate($image, 255, 255, 255);
  $blue = ImageColorAllocate($image, 0, 0, 255);
  $black = ImageColorAllocate($image, 0, 0, 0);
  $himage=
  ImageCreateFromGIF(/usr/hyrum/public_html/images/topics/hyrum.gif);
  ImageRectangle($image, 0, 0, 500, 70, $white);
  ImageString($image, 4, 0, 0, $text, $blue);
  ImageString($image, 3, 0, 20, $title1, $black);
  ImageString($image, 3, 0, 35, $title2, $black);
  ImageString($image, 3, 0, 50, $title3, $black);
  ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);
 
  ImagePNG($image, signature.png);
  ImageDestroy($image);
 
  - Original Message -
  From: Jeff Lewis [EMAIL PROTECTED]
  To: ReDucTor [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Monday, July 02, 2001 2:17 AM
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
   Tried with and without and no luck, it has me stumped :)
  
   Jeff
  
-Original Message-
From: ReDucTor [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 01, 2001 11:53 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Website dealing with PHP image generation?
   
   
shouldn't it be
$himage= /usr/hyrum/public_html/images/topics/hyrum.gif;
not
$himage= usr/hyrum/public_html/images/topics/hyrum.gif;
   
notice the first slash
- Original Message -
From: Jeff Lewis [EMAIL PROTECTED]
To: Jon Yaggie [EMAIL PROTECTED];
  [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 1:48 AM
Subject: RE: [PHP] Website dealing with PHP image generation?
   
   
 I have changed it to below but still get this error
  Warning: Supplied
 argument is not a valid Image resource in
/home/hyrum/public_html/test.php
 on line 41 and that is the ImageCopy line:

 $image = ImageCreate(500, 70);
 $bg = ImageColorAllocate($image, 255, 255, 255);
 $blue = ImageColorAllocate($image, 0, 0, 255);
 $black = ImageColorAllocate($image, 0, 0, 0);
 $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
 ImageRectangle($image, 0, 0, 500, 70, $white);
 ImageString($image, 4, 0, 0, $text, $blue);
 ImageString($image, 3, 0, 20, $title1, $black);
 ImageString($image, 3, 0, 35, $title2, $black);
 ImageString($image, 3, 0, 50, $title3, $black);
 ImageCopy($image, $himage, 400, 5, 1, 60, 60, 60);

 ImagePNG($image, signature.png);
 ImageDestroy($image);

 Jeff

  -Original Message-
  From: Jon Yaggie [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, May 30, 2001 6:31 PM
  To: [EMAIL PROTECTED]
  Subject: RE: [PHP] Website dealing with PHP image generation?
 
 
  Jeff,
 
  I am not extremely fimilar with this function.  However, I did
  notice you are copying your image at a width and height of 1x1.
  this is my guess as far as i know by default this pixels.  so
the
  likehood you would see an image copied at 1x1 is rather low.
 
  but perhaps i am complete wrong . . .let us know.
 
  I am creating an image on the fly based on newest entries
  in one my
mySQL
  tables.  In this created image I am trying to add a small one to
  it.  Now I
  am TRYING to use the below code:
 
  $image = ImageCreate(500, 70);
  $bg = ImageColorAllocate($image, 255, 255, 255);
  $blue = ImageColorAllocate($image, 0, 0, 255);
  $black = ImageColorAllocate($image, 0, 0, 0);
  $himage= usr/hyrum/public_html/images/topics/hyrum.gif;
  ImageRectangle($image, 0, 0, 500, 70, $white);
  ImageString($image, 4, 0, 0, $text, $blue);
  ImageString($image, 3, 0, 20, $title1, $black);
  ImageString($image, 3, 0, 35, $title2, $black);
  ImageString($image, 3, 0, 50, $title3, $black);
  file://ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60)
 
  Imagepng($image, signature.png);
  ImageDestroy($image);
 
  Am I using ImageCopy incorrectly?  It doesn't put anything in
the
  new image.
 
 
 


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

[PHP] Quicky, I forgot a Varible ):

2001-07-01 Thread ReDucTor

Hey, I Forgot the Variable that has the current Document/script or Folder of the 
Docment/script



Re: [PHP] Quicky, I forgot a Varible ):

2001-07-01 Thread ReDucTor

$HTTP_SERVER_VARS[PATH_TRANSLATED]
I got it :)
- Original Message - 
From: Jason Murray [EMAIL PROTECTED]
To: 'ReDucTor' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:37 PM
Subject: RE: [PHP] Quicky, I forgot a Varible ):


  Hey, I Forgot the Variable that has the current 
  Document/script or Folder of the Docment/script
 
 Look at the output from phpInfo(), then - you'll find it there.
 
 I didn't answer you because I can't figure out precisely which
 variable you want based on your question.
 
 Jason
 
 -- 
 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] Quicky, I forgot a Varible ):

2001-07-01 Thread ReDucTor

I Just needed it to make Auto Install Script. :)

- Original Message -
From: Chris Anderson [EMAIL PROTECTED]
To: Jason Murray [EMAIL PROTECTED]; 'ReDucTor'
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, July 02, 2001 2:51 PM
Subject: Re: [PHP] Quicky, I forgot a Varible ):


 Maybe he means $PHP_SELF?
 Then again he just kindof rambled
 - Original Message -
 From: Jason Murray [EMAIL PROTECTED]
 To: 'ReDucTor' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, July 02, 2001 12:37 AM
 Subject: RE: [PHP] Quicky, I forgot a Varible ):


   Hey, I Forgot the Variable that has the current
   Document/script or Folder of the Docment/script
 
  Look at the output from phpInfo(), then - you'll find it there.
 
  I didn't answer you because I can't figure out precisely which
  variable you want based on your question.
 
  Jason
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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



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




Re: [PHP] search for a better php source code viewer

2001-06-27 Thread ReDucTor

EditPlus is the best program EVER

I use it for every thing... :) :)
- Original Message -
From: Patrick Calkins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 9:45 AM
Subject: Re: [PHP] search for a better php source code viewer


 You should try EditPlus !!! I love it!
 http://www.editplus.com/
 It runs on Win95/98/2000/NT and will create a Unix/Mac/PC file. Has custom
 syntax highlighting, spell checker, integrated web browser, etc, etc. It
 handles PHP, ASP, Perl, C++, and more...


 scott [gts] [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  im a textpad fan.  (for windows)
   http://textpad.com/
 
   it supports custom syntax hilighting,
   line numbers, and a ton of other features
   that i use :)
 
 
-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 10:26 AM
To: [EMAIL PROTECTED]; php
Subject: Re: [PHP] search for a better php source code viewer
   
   
I suggest ConTEXT.  It's free, and it's for windows.
http://www.fixedsys.com/context
   
And for Linux, I suggest Nedit.
http://www.nedit.org/
   
Tyler
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 



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



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




Re: [PHP] Filtering out \ when a ' is user entered?

2001-06-27 Thread ReDucTor

stripslashes($string)
- Original Message - 
From: Marcus James Christian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 27, 2001 2:18 PM
Subject: [PHP] Filtering out \ when a ' is user entered?


 Hello,
 
 I'm pretty new to PHP but all I've seen of it so far I pretty much love!
 
 I've built a web log but when the user enters their data and they use '
 or   (and you know they will)   php always shows it from the included
 web log as
 
 \'  How can I filter out these backslashes so they don't appear on the
 final public viewable page?
 
 Thanks,
 Marcus
 
 --
 Marcus James Christian - UNLIMITED -
 Multimedia Internet Design
 http://mjchristianunlimited.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] Linux Guru's

2001-06-26 Thread ReDucTor



Hey Dudes, little off the PHP Subject, but Linux I 
have "RedHat 7.1" CD Here, and i want to dual boot it with my WinXP i don't want 
to repartition my HDD, i would prefer to have a File on my hdd that has Linux on 
it, my WinXP install is on a FAT32 Partition..
 Now how can i do this? :)
 - 
James "ReDucTor" Mitchell


<    1   2