php-general Digest 22 Jun 2008 04:34:40 -0000 Issue 5527

Topics (messages 275748 through 275780):

Re: Associative Arrays
        275748 by: Daniel Brown

Re: Case sensitive password
        275749 by: Pavel

Re: Search like php.net's URL thingy
        275750 by: Ryan S

Re: Boa Webserver and PHP5
        275751 by: Michelle Konzack
        275764 by: Stut

Re: [MOREINFO] How to prevent DoS on PHP script?
        275752 by: Michelle Konzack
        275766 by: Stut

[gnupg] HOW to check signed files from withing PHP
        275753 by: Michelle Konzack

Re: Military Service WAS [PHP] Capitalization of variable
        275754 by: Michelle Konzack
        275755 by: Michelle Konzack
        275756 by: Michelle Konzack
        275757 by: Michelle Konzack
        275758 by: Michelle Konzack
        275760 by: Michelle Konzack
        275762 by: Dotan Cohen
        275772 by: Dotan Cohen

How to make a "Auto View" and a "Download" Link for PDF?
        275759 by: Michelle Konzack
        275777 by: Bastien Koert

Re: Sessions across multiple pages
        275761 by: Bastien Koert

Another canvas example
        275763 by: Richard Heyes
        275767 by: Daniel Brown
        275769 by: tedd
        275773 by: Richard Heyes
        275776 by: Ray Hauge
        275778 by: Wolf

Re: (*OT) What we are going to do about those OT's?
        275765 by: Daniel Brown
        275770 by: tedd

Re: Capitalization of variable
        275768 by: Shawn McKenzie
        275771 by: tedd
        275774 by: Nathan Nobbe

Re: Installing PEAR on machines without internet access.
        275775 by: Gregory Beaver

5.3 Timeline and Features(true anon functions? shorter array syntax?)
        275779 by: Weston C

Re: XML DOM problem with getAttribute(string)
        275780 by: dominussuus.gmail.com

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
On Fri, Jun 20, 2008 at 10:04 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
>
> You should have looked here:
>
>    http://ca.finance.yahoo.com/currency/convert?amt=1&to=USD&from=CAD
>
> Instead of at last years currency.

    The link I provided was purposeful, to illustrate how quickly the
US Dollar vs. Canadian Dollar "similarized" in the Second Reign of
Emporer Bush.

-- 
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

--- End Message ---
--- Begin Message ---
В сообщении от Friday 20 June 2008 23:05:55 Andrew Ballard написал(а):

> >> > if(preg_match('/^'.$_SESSION['userpass'].'$/i',$login)) {
So, why you use "/i" ? :-)


-- 
===============
С уважением, Манылов Павел aka [R-k]
icq: 949-388-0
mailto:[EMAIL PROTECTED]
===============
А ещё говорят так:
The higher the "higher-ups" are who have come to see your demo, the lower your 
chances are of giving a successful one
                -- Fundamental Law of Thermodynamics n?4
[fortune]

--- End Message ---
--- Begin Message ---
> > P.S will be deleting the urls that you created, hope you dont mind, coz 
> > just in case someone later keeps using the url you posted via the 
> > archives...

>    Hang on, I want to post it on Digg first....


Hehe, no fear there... all my posts on dig never get me more than a few clicks 
anyway...



      

--- End Message ---
--- Begin Message ---
Am 2008-06-18 16:49:35, schrieb Wolf:
> Nope, i'm running PHP on my machines just fine and there are no issues.
> 
> This is a user configuration issue.
> 
> First: add the lines to apache

???  --  I run apache since over 9 years and I do not habe to
add any lines...  PHP works from scratch.  Or do you mean Boa?

It seems, that Boa does not support php like apache which I need since
boa whnt the requests as

    http://localhost/cgi-bin/php/index.php

which does not work, since the Scrits want

    http://localhost/index.php

And of course I do not like to clutter my URL with CGI crap

Any suggestions for a light HTTPD which can handel PHP5 inline?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
On 20 Jun 2008, at 20:35, Michelle Konzack wrote:
Any suggestions for a light HTTPD which can handel PHP5 inline?

Lighttpd, nginx and anything else that supports fastcgi which is pretty much most web servers these days.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Hello,

I should note additionaly they http password protection is not realy  an
option since I have annonymous users which  upload  Debian  Sources  and
Packages...

Also I the upload must work from any place in the  Net,  even  using  M$
ware, any webbrowser, a cellphone or whatelse...

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
On 21 Jun 2008, at 14:10, Michelle Konzack wrote:
I should note additionaly they http password protection is not realy an option since I have annonymous users which upload Debian Sources and
Packages...

Also I the upload must work from any place in the Net, even using M$
ware, any webbrowser, a cellphone or whatelse...

If you can't protect the upload URL by giving authorised users something then you have no chance at all. If you allow anonymous users to do something then you allow the "bad guys" to do it too.

Your only hope is to do some traffic shaping on uploads but you'll probably find that'll piss legitimate users off more than it will people trying to abuse it.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
************************************************************************
*       Do not Cc: me, because I READ THIS LIST, if I write here       *
*    Keine Cc: am mich, ich LESE DIESE LISTE wenn ich hier schreibe    *
************************************************************************

Hello,

on my "Devel" site, someone can upload Debian Sources/Packages but  they
must be signed.

OK the first file looks like

---[ command 'tddebdevel --get-changes tdddbidate' ]---------------------
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 31 May 2006 17:11:22 +0200
Source: tddebidate
Binary: tddebidate
Architecture: source all
Version: 0.4.7
Distribution: unstable
Urgency: low
Maintainer: Michelle Konzack <[EMAIL PROTECTED]>
Changed-By: Michelle Konzack <[EMAIL PROTECTED]>
Description:
 tddebidate - Show Debian packages by install date/time
Changes:
 tddebidate (0.4.7) unstable; urgency=low
 .
   * Correcting weiredbehaviour of translated TEXT strings in Xdialog
Files:
 0de5e54938bd20a1d0e2ace0eec55708 513 admin extra tddebidate_0.4.7.dsc
 0f6c5b8d180989dac99f0f6fcc3d4a13 6973 admin extra tddebidate_0.4.7.tar.gz
 d2a9d9bc0ac86d861613c1e4d27d8920 8456 admin extra tddebidate_0.4.7_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEfch5C0FPBMSS+BIRAsYUAJsEwzmzWljrQtGmH+tgmScxOLx8jACfYgFO
FVhP6Wpw75B7TD+QRbGxtsg=
=T2pr
-----END PGP SIGNATURE-----
------------------------------------------------------------------------

and the seconed (.dsc file) is similar.

Does anyone know a tool which is able to check  this  signature  IF  the
PHP5 script runs on the Web-Server?

Currently I do things like:

----[ '/var/www/debian.devel/htdocs/index.php' ]------------------------

$DIR_BASE=/var/www/customers/konzack
$DIR_HOST=$DIR_BASE/debian.devel
$DIR_TMP=$DIR_BASE/TMP
$DIR_GPG=$DIR_BASE/GNUPG

exec("sed '^/Format:/,/^$/!d' $DIR_TMP/$UPLOAD_ID/$CHANGES |grep '.' 
>$DIR_TMP/$UPLOAD_ID/$CHANGES.txt");
exec("sed '/^-----BEGIN PHP SIGNATURE/,/^-----END PHP SIGNATURE/p' 
$DIR_TMP/$UPLOAD_ID/$CHANGES >$DIR_TMP/$UPLOAD_ID/$CHANGES.sig");
exec("gpg --homedir $DIR_GPG/GNUPG --verify $DIR_TMP/$UPLOAD_ID/$CHANGES.sig 
$DIR_TMP/$UPLOAD_ID/$CHANGES.txt"; FOO; GPGRET);
if ($GPGRET) {
  $FLAG = "true";
} else {
  echo "I do not like this files...\n";
  exec("rm --force $DIR_TMP/$UPLOAD_ID/* ; rmdir --ignore-fail-on-non-empty 
$DIR_TMP/$ID")
  $FLAG = "false";
}
------------------------------------------------------------------------

What I realy dislike are the exec() calls.

Any native PHP5 suggestions which are working faster with less resources?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Am 2008-06-19 11:45:22, schrieb Jay Blanchard:
> In a similar vein I believe that folks wishing to immigrate to this
> country should serve similarly.

Hmmm, imagine you are from the old "Afghanistan" @army,
then migratig to the USA and must serv there..      :-D

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Am 2008-06-19 13:12:29, schrieb Daniel Brown:
>     Exactly.  And not just a single branch, either - feel free to join
> any branch of the Armed Forces.  For mandatory service, it should be
> on a one or two year term, as opposed to volunteer options of 3, 4, or
> 6 years.  And when in there, keep in mind that you're not just going
> to be some tank crunchy in the middle of the desert; you can be
> anything at all, including a police officer, a cook, a priest, a
> paramedic, a mechanic, a programmer, a truck driver, or nearly
> anything else at all.

...saboteur, double agent!

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Hello Nitsan,

I have Jew friends herein Strasbourg ad in Israel and they already  have
served and it was NOT funny.  Since onn of  them  had  a  family  member
which has french citizenship and serverd 4 years in the french army, the
Israelien one is VERY bad equiped and it lakes in all directins there.

I am Ex-Colonel (France) and was 24years working for them and I am in IT
security, analysis and electronic war.  I know very well what  is  going
on in other countries.  Even one of the "modernest armies" in the  world
(the US one) are very bad equiped in Iraq...

I have several 20.000 photos and over 200  videos  made  from  Iraq  and
elsewhere...

Peoples serving mandatory for 1-2 years are fsck'ed!!!

There are ONLY an handful "special units" which have the  equipment  and
the "real force"...

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant



Am 2008-06-19 19:48:54, schrieb Nitsan Bin-Nun:
> Dan i'm 16 years old, currently my monthly salary (working as php
> freelancer) almost catching my dad's and he is living good.
> In 2 years from now I have to serv, probably at the battle field (I'm
> healthy qualified) and usualy the place where guys like me being send to
> includes additional 2 years - at the bottom line I'm getting in at age of 18
> and becoming a citizen when i'm 23-24, I believe that if I won't take this
> service (there are zillions of oppertunities to step back from the
> service) I can start work at some web developing company (not freelancing)
> and start learn at university or something, but in Israel the feelings of
> apperciation to the motherland is higher than anywhere else in the world,
> since you are young the people around you (the nuclear family and everyone
> you know) injecting you the poison of this apperciation, so when you are 18
> years-old you know what is the meaning of service and you are aspiring to
> serv as much & as good as you can.
> 
> Regards,
> Nitsan
------------------------ END OF REPLIED MESSAGE ------------------------



-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Am 2008-06-20 12:18:29, schrieb Dotan Cohen:
> 
> Good for you, Nitsan. If you find yourself in Gdud 51 let me know.
> 
> Dotan Cohen

:-D

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Merhaba Sancar,

Am 2008-06-20 09:21:30, schrieb Sancar Saran:
> The Turkish Gendarmerie (Jandarma Genel Komutanligi)

;-)

How long is the service there?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Am 2008-06-19 10:25:10, schrieb Jay Blanchard:
> [snip]
>     I wonder how many of us on the list served.  It's got to be more
> than just you and I, Tedd, wouldn't you think?
> [/snip]
> 
> U.S. Air Force

2eme Rep/Legion Etangere Français       (11yars 5mont)
DGSE/French regular Army                (12years)

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
2008/6/21 Michelle Konzack <[EMAIL PROTECTED]>:
> Am 2008-06-19 11:45:22, schrieb Jay Blanchard:
>> In a similar vein I believe that folks wishing to immigrate to this
>> country should serve similarly.
>
> Hmmm, imagine you are from the old "Afghanistan" @army,
> then migratig to the USA and must serv there..      :-D
>

In my country, those who have served in a foreign army are exempt from
serving here.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

--- End Message ---
--- Begin Message ---
2008/6/21 Michelle Konzack <[EMAIL PROTECTED]>:
> I have Jew friends herein Strasbourg ad in Israel and they already  have
> served and it was NOT funny.  Since onn of  them  had  a  family  member
> which has french citizenship and serverd 4 years in the french army, the
> Israelien one is VERY bad equiped and it lakes in all directins there.
>
..snip..
>
> There are ONLY an handful "special units" which have the  equipment  and
> the "real force"...
>

While I won't confirm nor deny my opinion of your statement, tell me,
in your opinion how much does training matter? And dedication to the
cause? I do not think that you will find comparable training and
dedication as there is in the Israeli army, at least in the combat
units. Nice, modern equipment is important, but it is only 10% of the
job of a foot soldier. Especially in an army which is trained to use
their rifles as little as possible, such as the Israeli army.

>> Good for you, Nitsan. If you find yourself in Gdud 51 let me know.
>
> :-D

Are you familiar with my unit?

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

--- End Message ---
--- Begin Message ---
************************************************************************
*       Do not Cc: me, because I READ THIS LIST, if I write here       *
*    Keine Cc: am mich, ich LESE DIESE LISTE wenn ich hier schreibe    *
************************************************************************

Hello,

I generate PDFs on the fly and I like to setup TWO links on the HTML/PHP
page for the SAME PDF:

    1)  View
    2)  Download

I have seen this on other Websites, but can not figure out HOW this  was
done.

Suggestions?

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
On Sat, Jun 21, 2008 at 10:08 AM, Michelle Konzack <
[EMAIL PROTECTED]> wrote:

> ************************************************************************
> *       Do not Cc: me, because I READ THIS LIST, if I write here       *
> *    Keine Cc: am mich, ich LESE DIESE LISTE wenn ich hier schreibe    *
> ************************************************************************
>
> Hello,
>
> I generate PDFs on the fly and I like to setup TWO links on the HTML/PHP
> page for the SAME PDF:
>
>    1)  View
>    2)  Download
>
> I have seen this on other Websites, but can not figure out HOW this  was
> done.
>
> Suggestions?
>
> Thanks, Greetings and nice Day/Evening
>    Michelle Konzack
>    Systemadministrator
>    24V Electronic Engineer
>    Tamay Dogan Network
>    Debian GNU/Linux Consultant
>
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> ##################### Debian GNU/Linux Consultant #####################
> Michelle Konzack   Apt. 917                  ICQ #328449886
> +49/177/9351947    50, rue de Soultz         MSN LinuxMichi
> +33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)
>

I use the dompdf class and ran into the same issue when dealing with that
PoS IE. It wouldn't handle the direct stream from the class so I did a check
for the browser and if its IE then save the file and force a file
download...anything else it just streams from the class to the browser.

function createPDF($html,$thisFileName,$hash)
{

  require_once("includes/dompdf_config.inc.php");

// Turn off all error reporting
//error_reporting(0);

    $dompdf = new DOMPDF();
    $dompdf->load_html($html);
    $dompdf->render();

// The next call will store the entire PDF as a string in $pdf

  $pdf = $dompdf->output();

// You can now write $pdf to disk, store it in a database or stream it
// to the client.

//check if IE,since it doesn't like the stream, so we save it to disk and
then stream the saved file
  $browserCheck = browserDetection();

  if ($browserCheck)
  {
      if (!is_dir("../data/$hash"))
      {
        mkdir("../data/$hash");
      } // end is_dir check

// save the file
      if(!file_put_contents("../data/$hash/$thisFileName", $pdf))
      {
        echo "failed to write new pdf file";
      }
// force the download
      showPDF("../data/$hash/$thisFileName");
  }else{
      $dompdf->stream("$thisFileName");
  }// if user agent
}//end function createPDF


-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
On Fri, Jun 20, 2008 at 5:48 PM, R.C. <[EMAIL PROTECTED]> wrote:

> "tedd" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > If you had used my minimal method, I could have provided you with a
> > simple example. But considering you want bloat, try reading the
> > manual about sessions. :-)
> > Cheers,
> > tedd
>
> This was very helpful Tedd....  sorry I used someone else's method here
> from
> this group... it wasn't bloat at all, but very functional actually and I
> managed to get those 3 issues combined and working. But I did appreciate
> your input.
>
> So.. that said: let's get back to what I ask and maybe someone can give me
> some insight into how to make these sessions work across these multiple
> pages.  And yes, I am reading thru manuals:  Here's the script sofar and my
> question:
>
> One more thing to ask you gurus:
> Here's the workflow:  user clicks on login.php (which has the login form)
> fills out form and get directed to video.php. (if the password is incorect,
> it opens up loginfail.php with message and link back to login.php.
>
>  Now the main video page has a bunch of individual videos set up they can
> view, each on a separate page that opens. At end of each separate sub-video
> page is a "back" button that gets user back to the main video "video.php"
> site BUT... now they have to log back in with password and email... which
> is
> a pain.
>
> Without having a database for this, I believe one could use sessions to
> keep
> the information in memory and transferrable to all the video subpages while
> user is on the site? I tried playing with this but couldn't get this to go.
>
> Below is the code that sits at the top of the main video page "video.php".
> One of the subpages is called "video-1-flash.html" . What would I need to
> input into the "video-1-flash.html" page ( I know it would have to be
> converted to a php file) and where should the code go to ensure that the
> user does not have to log in again, once the back button on the subpage
> clicked and directs the user back to the main video page for further
> selections.
>
> <?php
> session_start();
>  $_SESSION ['userpass'] = $_POST ['pass'];
>  $_SESSION ['authuser'] = 0;
> $login="video";
> if (preg_match('/^'.$_SESSION['userpass'].'$/i',$login)) {
> $_SESSION['authuser'] = 1;
>
> /* this code will be executed if login is successful */
> $headers = "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> $headers .= 'From: Full Video <[EMAIL PROTECTED]>';
> $message = '<p>User '. $_POST ['email'].' has logged in.</p>';
> mail(' [EMAIL PROTECTED]',   $email . ' logged in', $message, $headers);
>
> } else {
>  echo include("loginfail.html");
> exit(); }
> ?>
>
> Hope this made sense.  Thanks for your assistance.
> R.C.
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
simple

<?php

//start the session tracking on each page
session_start();

//test to see if your session variables are set and if NOT SET then redirect
the user
if(( empty($_SESSION ['userpass'])) && ( $_SESSION ['authuser'] != 1))
{
  header("location:login.php");
  exit();
}

//rest of the page content goes here

?>

-- 

Bastien

Cat, the other other white meat

--- End Message ---
--- Begin Message ---
Hi,

Latest in my new series of "look at me, aren't I cool" canvas examples is here:

http://www.phpguru.org/pie/pie.html

Works in IE7 too. And Opera. Ooh.

--
Richard Heyes

        Employ me:
http://www.phpguru.org/cv

--- End Message ---
--- Begin Message ---
On Sat, Jun 21, 2008 at 10:39 AM, Richard Heyes <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Latest in my new series of "look at me, aren't I cool" canvas examples is
> here:
>
> http://www.phpguru.org/pie/pie.html
>
> Works in IE7 too. And Opera. Ooh.

    Tests just fine in FF3 (3.0.0 final) on Windows, and in Mandriva
(KDE) using FF3 beta 5.  I'll check it in Netscape 9, Konqueror, and
Galeon later, because I'm actually curious if they'll correctly decode
the BASE64 in the styling.

    Looks good, Rich.

-- 
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

--- End Message ---
--- Begin Message ---
At 3:39 PM +0100 6/21/08, Richard Heyes wrote:
Hi,

Latest in my new series of "look at me, aren't I cool" canvas examples is here:

http://www.phpguru.org/pie/pie.html

Works in IE7 too. And Opera. Ooh.

--
Richard Heyes

Richard:

It's NOT a pie chart, it's a beach ball cursor. But, it's cool.

As for use, I could think it might be used to let the user know in what state their cursor is in.

For example, when we, on a Mac, are copying a file, our cursor turns to a pointer with a plus. That cursor is not available via browsers. So, your canvas example could provide cursor attributes.

Just a thought -- I have to do some other thinking now.

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
> it's a beach ball cursor.

Lol. A didn't see it like that, but now you've mentioned it, it's kinda stuck and that's all I can see now. :-)

--
Richard Heyes

        Employ me:
http://www.phpguru.org/cv

+----------------------------------------+
| Access SSH with a Windows mapped drive |
|    http://www.phpguru.org/sftpdrive    |
+----------------------------------------+

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
Hi,

Latest in my new series of "look at me, aren't I cool" canvas examples is here:

http://www.phpguru.org/pie/pie.html

Works in IE7 too. And Opera. Ooh.


Awesome stuff. I think the canvas element will be my next adventure. I've been learning JavaScript a lot recently. That's been an interesting experience that I'm glad I did.

--
Ray Hauge
www.primateapplications.com

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
Hi,

Latest in my new series of "look at me, aren't I cool" canvas examples is here:

http://www.phpguru.org/pie/pie.html

Works in IE7 too. And Opera. Ooh.

Great beach ball!

The nice thing about adverts, is that MOST people use /ads/* in their coding to place their adverts, so using Adblock+ gets rid of them PDQ. :)

You gonna post the source code? ;)

Wolf


--- End Message ---
--- Begin Message ---
On Sat, Jun 21, 2008 at 9:48 AM, Colin Guthrie <[EMAIL PROTECTED]> wrote:
>
> The occasional OT post is what helps make the community feeling here.
> Removing them to a separate list will make the core one much more clinical
> and less enjoyable.

    Hey, Col.   Thought you were dead.  ;-P

-- 
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

--- End Message ---
--- Begin Message ---
At 1:00 PM -0400 6/21/08, Daniel Brown wrote:
On Sat, Jun 21, 2008 at 9:48 AM, Colin Guthrie <[EMAIL PROTECTED]> wrote:

 The occasional OT post is what helps make the community feeling here.
 Removing them to a separate list will make the core one much more clinical
 and less enjoyable.

    Hey, Col.   Thought you were dead.  ;-P

Actually, I agree with the Col.

I've been on other programming list that tried the OT list thing and met with tragic results.

It's nice to keep our thoughts on subjects to a cursory level, because if we all knew what we all actually thought, we might not speak to each other. :-)

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
tedd wrote:
At 11:41 PM -0400 6/18/08, Ron Piggott wrote:
How do I make the first letter of a variable be a capital?

I am using this with names.  If the user types "ron" I want to save it
as "Ron".

Thanks for your help.

Ron

Not everyone wants their name capitalized.

Cheers,

tedd


Yeah!

-shawn (formerly -Shawn)

--- End Message ---
--- Begin Message ---
At 1:01 AM -0500 6/21/08, Shawn McKenzie wrote:
tedd wrote:
At 11:41 PM -0400 6/18/08, Ron Piggott wrote:
How do I make the first letter of a variable be a capital?

I am using this with names.  If the user types "ron" I want to save it
as "Ron".

Thanks for your help.

Ron

Not everyone wants their name capitalized.

Cheers,

tedd


Yeah!

-shawn (formerly -Shawn)

Great! A convert.

You see, I used to be Tedd when I was important, but now...

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On Sat, Jun 21, 2008 at 1:17 PM, tedd <[EMAIL PROTECTED]> wrote:

> At 1:01 AM -0500 6/21/08, Shawn McKenzie wrote:
>
>> tedd wrote:
>>
>>> At 11:41 PM -0400 6/18/08, Ron Piggott wrote:
>>>
>>>> How do I make the first letter of a variable be a capital?
>>>>
>>>> I am using this with names.  If the user types "ron" I want to save it
>>>> as "Ron".
>>>>
>>>> Thanks for your help.
>>>>
>>>> Ron
>>>>
>>>
>>> Not everyone wants their name capitalized.
>>>
>>> Cheers,
>>>
>>> tedd
>>>
>>
>>
>> Yeah!
>>
>> -shawn (formerly -Shawn)
>>
>
> Great! A convert.
>
> You see, I used to be Tedd when I was important, but now..


and i used to be -Nathan, when i was tall; but that was a former life.

-nathan

--- End Message ---
--- Begin Message ---
Lester Caine wrote:
> I've been going through the hoops documenting installation and recovery
> notes for my customer sites. The majority of these run local web
> services with no internet access from the servers, so with the
> increasing reliance on PEAR extensions, I'm looking to the correct way
> to 'install' PEAR packages.
> 
> Currently I just clone the PEAR directory from another machine. Is this
> the only way ?

This will work if and *only* if the paths are the same on the
destination machine.  If so, this works fine.  Otherwise, you can
install PEAR directly just as PHP does, using install-pear-nozlib.phar,
check out the pear/ directory in your unix-based PHP distribution for
the Makefile.frag that shows usage.  After PEAR is installed, you can
install packages directly from tarball via the command-line.

pear install Package-1.2.3.tgz

Greg

P.S.  PEAR questions are best asked on [EMAIL PROTECTED], the
best support for PEAR is on that list.

--- End Message ---
--- Begin Message ---
Just curious if anyone knows the rough timeline for PHP 5.3.

Also curious if anyone knows whether anon functions/closures or a
shorter JSON-ish array syntax are being considered for inclusion. I
know there were two patches announced in December/January:

http://marc.info/?l=php-internals&m=119833623532713&w=2
http://marc.info/?l=php-internals&m=119995972028293&w=2

But they don't seem to be part of the early June 5.3 releases, much as
I'd love to see them.

--- End Message ---
--- Begin Message ---
Thank you again for your help.

I've popped the file to http://FileHost.JustFreeSpace.Com/157index.php
.  A typical file that'll be plugged into this template lives at
http://FileHost.JustFreeSpace.Com/940index.htm .

With thanks,

Borden

On 11/06/2008, Rob Richards <[EMAIL PROTECTED]> wrote:
> You might want to put a link to a complete example because
> $page->documentElement->getAttributeNS('http://www.w3.org/XML/1998/namespace',
> 'lang'); is how you access it.
>
>
> Rob
>
>
> [EMAIL PROTECTED] wrote:
>> Thank you, Rob,
>>
>> Unfortunately, that didn't work, either (though I'll keep it in mind).
>>  The returned string is still empty.
>>
>> I also unsuccessfully fetched the 'xmlns' attribute using
>> getAttribute().  Interestingly, although hasAttributes(void) returns
>> true, hasAttribute('xmlns'), and hasAttribute(' xml:lang') both return
>> false.
>>
>> On 11/06/2008, Rob Richards <[EMAIL PROTECTED]> wrote:
>>> Borden Rhodes wrote:
>>>> I'm having a pig of a time trying to figure this one out:  I have an
>>>> XHTML document which I've loaded into a DOMDocument because I want to
>>>> add more tags to it.  However, since I live in a bilingual country, I
>>>> want to get the document's xml:lang attribute so I know what language
>>>> to add my new tags in.
>>>>
>>>> I want to write
>>>>
>>>> $lang = $page->documentElement->getAttribute('xml:lang');
>>>> OR
>>>> $lang = $page->documentElement->getAttributeNS('xml', 'lang');
>>>>
>>>> but both of these return empty strings, indicating that it cannot find
>>>> the xml:lang attribute.  And yet,
>>>> $page->documentElement->hasAttributes() returns true and
>>>>
>>>> $page->documentElement->attributes->getNamedItem('xml:lang')->nodeValue;
>>>>
>>>> works correctly.  So why doesn't my preferred code?
>>> The xml prefix is bound to the http://www.w3.org/XML/1998/namespace
>>> namespace.
>>>
>>> $lang =
>>> $page->documentElement->getAttributeNS('http://www.w3.org/XML/1998/namespace',
>>> 'lang');
>>>
>>> Rob
>>>
>
>

--- End Message ---

Reply via email to