php-general Digest 15 Aug 2007 17:48:49 -0000 Issue 4963
Topics (messages 260832 through 260863):
Re: About UTF-8 / ANSI
260832 by: Anders Norrbring
problem with require_once
260833 by: Vanessa Vega
260835 by: Tijnema
260836 by: Chris
260840 by: Sanjeev N
Re: Forwarding $_POST[]...
260834 by: Eddie Dunckley
Parsing Variables Inside a String
260837 by: heavyccasey.gmail.com
260838 by: Chris
260839 by: heavyccasey.gmail.com
260842 by: Sanjeev N
260843 by: Sanjeev N
260850 by: heavyccasey.gmail.com
260851 by: heavyccasey.gmail.com
260857 by: Jim Lucas
Re: www.soongy.com
260841 by: Sanjeev N
Re: PHP Books - A poll of sorts
260844 by: David Powers
260845 by: Man-wai Chang To Die
Re: zip freezes - how to handle corrupt CRC in zip-file
260846 by: ecc
cant get if logic correct..
260847 by: Gregory Machin
260848 by: Per Jessen
260849 by: Michael Preslar
260859 by: Jim Lucas
QuickTime question
260852 by: tedd
260853 by: Eric Butera
260855 by: Stut
260861 by: brian
260862 by: tedd
OOP in PHP
260854 by: Patrik Hasibuan
260856 by: Nathan Nobbe
260858 by: Robert.Degen.rwth-aachen.de
260860 by: Jim Lucas
Problem downloading files in IE
260863 by: Richard S. Crawford
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 ---
Kelvin Park skrev:
I heard from a person that he was having some problem with uploading and
displaying a web site on an ordinary web hosting server because the
files weren't saved as UTF-8 charset (instead they were saved in
iso-8859-1).
Could saving HTML files in a different charset (UTF-8 or iso-8859-1)
cause problem with the web hosting server making the website totally
inaccessible?
Probably not.. However (as always), if code is misinterpreted due to
character set, tags may be interpreted incorrectly and generate errors
which prevents output. Most likely in case of cached pages where output
isn't presented until the page is fully parsed.
But I'd say it's not likely...
Anders.
--- End Message ---
--- Begin Message ---
Good day to all...
I would like to ask for some help..
I have a form created in javascript codes. The page is a pop up window.
I am passing the values of the form using the method "post". The PHP file
that handles the form displays the values from that and had the following
code in the beginning:
<?php
require_once('myclass.php');
//this class contains all functions for me to connect on the database
----------------rest of the code for displaying and saving values to an
existing databse----------------------
?>
when i clicked the submit button, nothing happens and the page wouldl just
refresh...
but when i removed the require_once code of my PHP, the values from the form
is displayed but of course, will not be saved since the class isnt
there.....
can anyone help me....
--- End Message ---
--- Begin Message ---
On 8/15/07, Vanessa Vega <[EMAIL PROTECTED]> wrote:
> Good day to all...
>
> I would like to ask for some help..
> I have a form created in javascript codes. The page is a pop up window.
> I am passing the values of the form using the method "post". The PHP file
> that handles the form displays the values from that and had the following
> code in the beginning:
>
> <?php
>
> require_once('myclass.php');
>
> //this class contains all functions for me to connect on the database
>
> ----------------rest of the code for displaying and saving values to an
> existing databse----------------------
>
> ?>
>
> when i clicked the submit button, nothing happens and the page wouldl just
> refresh...
> but when i removed the require_once code of my PHP, the values from the form
> is displayed but of course, will not be saved since the class isnt
> there.....
>
> can anyone help me....
>
Well, then you're problem is probably in your myclass.php file...
Please show some relevant code so that we can help.
Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info
--- End Message ---
--- Begin Message ---
Vanessa Vega wrote:
Good day to all...
I would like to ask for some help..
I have a form created in javascript codes. The page is a pop up window.
I am passing the values of the form using the method "post". The PHP file
that handles the form displays the values from that and had the following
code in the beginning:
<?php
require_once('myclass.php');
//this class contains all functions for me to connect on the database
----------------rest of the code for displaying and saving values to an
existing databse----------------------
?>
when i clicked the submit button, nothing happens and the page wouldl just
refresh...
but when i removed the require_once code of my PHP, the values from the form
is displayed but of course, will not be saved since the class isnt
there.....
The file 'myclass.php' isn't in the same folder as your new script so
php can't find it.
Using 'require' tells php to die if it can't find the file - which is
what is happening.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
Hi,
The problem is simple...
Either the file myclass.php path is wrong (may be your calling file is in
some folder and myclass.php is in another folder) or if path is correct and
file may have some syntax errors or some function may not exist..
Please check the path if wrong and check the file for syntax and content if
path is correct
Warm Regards,
Sanjeev
http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com - Submit your website URL
http://webhosting.sanchanworld.com - Choose your best web hosting plan
-----Original Message-----
From: Vanessa Vega [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 15, 2007 11:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] problem with require_once
Good day to all...
I would like to ask for some help..
I have a form created in javascript codes. The page is a pop up window.
I am passing the values of the form using the method "post". The PHP file
that handles the form displays the values from that and had the following
code in the beginning:
<?php
require_once('myclass.php');
//this class contains all functions for me to connect on the database
----------------rest of the code for displaying and saving values to an
existing databse----------------------
?>
when i clicked the submit button, nothing happens and the page wouldl just
refresh...
but when i removed the require_once code of my PHP, the values from the form
is displayed but of course, will not be saved since the class isnt
there.....
can anyone help me....
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Thu 09 Aug 07 20:11, Simon wrote:
> The dumbest (but still correct) way to do it is a for() loop that
> creates a hidden input with the name/value pair for each variables
> you want.
Might not be as dumb as one thinks: hidden vars are useful when some
misconfigured proxy or round-robin proxy or over-eagre serverside
session-expiry, or bad browser drops session_id cookie. *boom* you're
out. /Us prefer having a balance between sessions and post data: at
least with post data you can view the page and know what to expect when
the page is submitted. Though it is a bit silly posting a whole ecom
trolley contents as hidden vars, probably better to post a single
hidden var that points to a correct data container. (and thats what
sessions are for so if you like chickens you can call it a catch-22).
> I would advise against resending the username/password over and over.
Definately. especially if there is no form of encryption of these
tokens.
> Simon
--
Eddie.
"You may be recognized soon. Hide."
--- End Message ---
--- Begin Message ---
Hi, is there a function that can parse variables within a string?
For example:
$good_day = 'The';
$fr['iop'] = "y're crazy!";
$new = '$good_day$fr['iop']';
echo TheFunctionIRequest($new); // They're crazy!
Thanks!
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Hi, is there a function that can parse variables within a string?
For example:
$good_day = 'The';
$fr['iop'] = "y're crazy!";
$new = '$good_day$fr['iop']';
echo TheFunctionIRequest($new); // They're crazy!
Well this:
echo $good_day . $fr['iop'];
will do what you show here.
What are you trying to do exactly?
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
I need to get the variable names from a database.
On 8/15/07, Chris <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hi, is there a function that can parse variables within a string?
> >
> > For example:
> >
> > $good_day = 'The';
> > $fr['iop'] = "y're crazy!";
> >
> > $new = '$good_day$fr['iop']';
> > echo TheFunctionIRequest($new); // They're crazy!
>
> Well this:
>
> echo $good_day . $fr['iop'];
>
> will do what you show here.
>
>
> What are you trying to do exactly?
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
--- End Message ---
--- Begin Message ---
$new = '$good_day$fr['iop']';
This will give you error...
Instead if you try in this way as follows
$new = "$good_day$fr['iop']"; or
$new = $good_day.$fr['iop'];
It will include the "They're carzy!" in the $new variable..
Warm Regards,
Sanjeev
http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com - Submit your website URL
http://webhosting.sanchanworld.com - Choose your best web hosting plan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 15, 2007 12:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing Variables Inside a String
Hi, is there a function that can parse variables within a string?
For example:
$good_day = 'The';
$fr['iop'] = "y're crazy!";
$new = '$good_day$fr['iop']';
echo TheFunctionIRequest($new); // They're crazy!
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Consider the variable name inside database is 'emp_name' and now you want to
use this as $emp_name..
This variable will be stored in as follows
$variable1 = $resultfromdatabase['variable1'];
Then next step is store anything in this variable as follows
$$variable1 = "John";
I hope this may not help you for what you want, but at least It will gives
an idea for different methods..
Warm Regards,
Sanjeev
http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com - Submit your website URL
http://webhosting.sanchanworld.com - Choose your best web hosting plan
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 15, 2007 12:41 PM
To: Chris
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Parsing Variables Inside a String
I need to get the variable names from a database.
On 8/15/07, Chris <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hi, is there a function that can parse variables within a string?
> >
> > For example:
> >
> > $good_day = 'The';
> > $fr['iop'] = "y're crazy!";
> >
> > $new = '$good_day$fr['iop']';
> > echo TheFunctionIRequest($new); // They're crazy!
>
> Well this:
>
> echo $good_day . $fr['iop'];
>
> will do what you show here.
>
>
> What are you trying to do exactly?
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Thank you so much! :D
On 8/15/07, Sanjeev N <[EMAIL PROTECTED]> wrote:
> Consider the variable name inside database is 'emp_name' and now you want to
> use this as $emp_name..
>
> This variable will be stored in as follows
> $variable1 = $resultfromdatabase['variable1'];
>
> Then next step is store anything in this variable as follows
> $$variable1 = "John";
>
> I hope this may not help you for what you want, but at least It will gives
> an idea for different methods..
>
> Warm Regards,
> Sanjeev
> http://www.sanchanworld.com/
> http://webdirectory.sanchanworld.com - Submit your website URL
> http://webhosting.sanchanworld.com - Choose your best web hosting plan
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 15, 2007 12:41 PM
> To: Chris
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Parsing Variables Inside a String
>
> I need to get the variable names from a database.
>
> On 8/15/07, Chris <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> > > Hi, is there a function that can parse variables within a string?
> > >
> > > For example:
> > >
> > > $good_day = 'The';
> > > $fr['iop'] = "y're crazy!";
> > >
> > > $new = '$good_day$fr['iop']';
> > > echo TheFunctionIRequest($new); // They're crazy!
> >
> > Well this:
> >
> > echo $good_day . $fr['iop'];
> >
> > will do what you show here.
> >
> >
> > What are you trying to do exactly?
> >
> > --
> > Postgresql & php tutorials
> > http://www.designmagick.com/
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Thank you so much! :D
On 8/15/07, Sanjeev N <[EMAIL PROTECTED]> wrote:
> Consider the variable name inside database is 'emp_name' and now you want to
> use this as $emp_name..
>
> This variable will be stored in as follows
> $variable1 = $resultfromdatabase['variable1'];
>
> Then next step is store anything in this variable as follows
> $$variable1 = "John";
>
> I hope this may not help you for what you want, but at least It will gives
> an idea for different methods..
>
> Warm Regards,
> Sanjeev
> http://www.sanchanworld.com/
> http://webdirectory.sanchanworld.com - Submit your website URL
> http://webhosting.sanchanworld.com - Choose your best web hosting plan
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 15, 2007 12:41 PM
> To: Chris
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Parsing Variables Inside a String
>
> I need to get the variable names from a database.
>
> On 8/15/07, Chris <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] wrote:
> > > Hi, is there a function that can parse variables within a string?
> > >
> > > For example:
> > >
> > > $good_day = 'The';
> > > $fr['iop'] = "y're crazy!";
> > >
> > > $new = '$good_day$fr['iop']';
> > > echo TheFunctionIRequest($new); // They're crazy!
> >
> > Well this:
> >
> > echo $good_day . $fr['iop'];
> >
> > will do what you show here.
> >
> >
> > What are you trying to do exactly?
> >
> > --
> > Postgresql & php tutorials
> > http://www.designmagick.com/
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
Hi, is there a function that can parse variables within a string?
For example:
$good_day = 'The';
$fr['iop'] = "y're crazy!";
$new = '$good_day$fr['iop']';
echo TheFunctionIRequest($new); // They're crazy!
Thanks!
One thing to add to what everybody else is saying, is that you should use curly braces around your
variable names. This way the parser will not get confused.
$new = "{$good_day}{$fr['iop']}";
It just helps the parser recognize the beginning and ending of your variables.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--- End Message ---
--- Begin Message ---
Hi Gevorg,
Great work.. But few things.
Scroller is not working even at bottom content is there...
I tried in both mozila and IE... In IE when I selected text and moved down
then it scrolled down. But where in Mozila no use...
Warm Regards,
Sanjeev
http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com - Submit your website URL
http://webhosting.sanchanworld.com - Choose your best web hosting plan
-----Original Message-----
From: Gevorg Harutyunyan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 14, 2007 8:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] www.soongy.com
Hello,
I am Gevorg.
I just wanted to introduce you my new PHP based work here www.soongy.com
<http://www.soongy.com/> .
It is working on PHP and MySQL and here is used DHTML, AJAX.
Thank you very much.
Waiting for your response
Regards,
Gevorg
--- End Message ---
--- Begin Message ---
Jay Blanchard wrote:
If there was a best practices book would you buy it?
I write books on PHP aimed at the beginner/intermediate level, and have
a considerable collection of PHP books written by others. Two relatively
recent books that struck me as being important are "Pro PHP Security" by
Chris Snyder and Michael Southwell, and "Essential PHP Security" by
Chris Shiflett. (I know there's also "php|architect's Guide to PHP
Security" by Ilia Ashanetsky and Rasmus Lerdorf, but I haven't read it.)
The thing that struck me most about the books was that anyone thought
there should be a need for them. Of course, there is a need - that's why
they were written. However, surely security should be taught from the
very beginning? Every book on PHP (or any other language) should be a
"best practices" book.
The problem is that books are written by human beings, who are prone to
mistakes (myself included), and whose own view of "best practice" might
leave gaps in security. The other problem is that a lot of people who
use PHP just want to copy and paste a script that "works". Even if the
ready-made script has been designed with security in mind, using it
without understanding *how* it works can lead to unforeseen problems.
By the way, I would welcome constructive criticism of the scripts in my
books. I have tried to incorporate what I perceive to be the best
practices at the time of writing, but I'm sure there's room for improvement.
--
David Powers
--- End Message ---
--- Begin Message ---
> We all have our favorite PHP books and resources but there is one tome
> that seems to be missing from the group...a "best practices" book. We
PHP, being server-side, is not difficult. I think the client-side stuff
deserves some books (DOM, Javascript, CSS, XHTML, XML, ....) if you want
to save time.
--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.22.2
^ ^ 19:44:01 up 5 days 6:30 0 users load average: 0.05 0.06 0.02
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
--- End Message ---
--- Begin Message ---
Ah, fine. How do i use this ZIPARCHIVE::CHECKCONS flag?
Something like that should work, i think?
$zip = new ZipArchive;
$res = $zip->open ( $filename ZIPARCHIVE::CHECKCONS );
if (TRUE === $res) {
# all looks fine
}
elseif {
switch($res){
case ZIPARCHIVE::ER_INCONS:
# do some error handeling
break;
}
# test these errors
# ZIPARCHIVE::ER_EXISTS
# ZIPARCHIVE::ER_INCONS
# ZIPARCHIVE::ER_INVAL
# ZIPARCHIVE::ER_MEMORY
# ZIPARCHIVE::ER_NOENT
# ZIPARCHIVE::ER_NOZIP
# ZIPARCHIVE::ER_OPEN
# ZIPARCHIVE::ER_READ
# ZIPARCHIVE::ER_SEEK
}
Richard Lynch wrote:
>
> On Tue, August 14, 2007 5:42 am, ecc wrote:
>> i´m reading zip-files with the php zip-functions without a problem.
>> Now i
>> got and Zip containing an corrupt crc (If i open this file via winzip,
>> the
>> error is shown).
>>
>> It looks like the php functions for zip-handeling "zip_entry_read" and
>> "ZipArchive::getFrom..." do not quit on a bad crc checksum.... so
>> these
>> functions read in the file and than are in an infinite loop. Because i
>> use
>> PHP-GTK2 my tool feezes and the process has to be killed. On an
>> web-enviroment this could also a big problem ..... ok, user-zip
>> handeling on
>> web is not the best idea :-)
>>
>> I´ve found no way to find out, if an file in the zip file is an valid
>> or
>> corrupt entry. The output of "ZipArchive::statName" give me no info
>> about
>> the state of an entry.
>>
>> Is there any trick out there, how to manage this problem. Maybe this
>> is an
>> bug or missing feature in the zip extensions. Dont know!
>
> Perhaps checking the consistency with this ZIPARCHIVE::CHECKCONS flag
> would help.
>
> This is just a wild guess.
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/browse/from/lynch
> Yeah, I get a buck. So?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
View this message in context:
http://www.nabble.com/zip-freezes---how-to-handle-corrupt-CRC-in-zip-file-tf4266474.html#a12161999
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
Hi
i have a piece of code that gets info from a comma delimited file,
then gets each value that is to be insterted into the database ....
The variabls must only contain numbers and must not be null ..
but the logic i have is iether not working or there are some hidden
characters creeping in because it is processing the data ... how can i
do this better ?
for($i=2;$i<$arrsize;$i++){
$parts=explode(",",$lines[$i]);
$stnr=$parts[0];
$subj=$parts[1];
$mark=$parts[4];
if (($stnr>"") and ($subj>"") and ($mark>"")){
//do alot of something lol
}
}
--
Gregory Machin
--- End Message ---
--- Begin Message ---
Gregory Machin wrote:
> Hi
> i have a piece of code that gets info from a comma delimited file,
> then gets each value that is to be insterted into the database ....
>
> The variabls must only contain numbers and must not be null ..
> but the logic i have is iether not working or there are some hidden
> characters creeping in because it is processing the data ... how can i
> do this better ?
Maybe use a regex?
/Per Jessen
--- End Message ---
--- Begin Message ---
This will be of help.
http://us2.php.net/manual/en/function.is-numeric.php
On 8/15/07, Gregory Machin <[EMAIL PROTECTED]> wrote:
> Hi
> i have a piece of code that gets info from a comma delimited file,
> then gets each value that is to be insterted into the database ....
>
> The variabls must only contain numbers and must not be null ..
> but the logic i have is iether not working or there are some hidden
> characters creeping in because it is processing the data ... how can i
> do this better ?
>
>
> for($i=2;$i<$arrsize;$i++){
> $parts=explode(",",$lines[$i]);
> $stnr=$parts[0];
> $subj=$parts[1];
> $mark=$parts[4];
> if (($stnr>"") and ($subj>"") and ($mark>"")){
> //do alot of something lol
> }
> }
>
> --
> Gregory Machin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Gregory Machin wrote:
Hi
i have a piece of code that gets info from a comma delimited file,
then gets each value that is to be insterted into the database ....
The variabls must only contain numbers and must not be null ..
but the logic i have is iether not working or there are some hidden
characters creeping in because it is processing the data ... how can i
do this better ?
for($i=2;$i<$arrsize;$i++){
$parts=explode(",",$lines[$i]);
$stnr=$parts[0];
$subj=$parts[1];
$mark=$parts[4];
if (($stnr>"") and ($subj>"") and ($mark>"")){
//do alot of something lol
}
}
for ( $i=2; $i<$arrsize; $i++ ) {
// Explode string into what you need
list($stnr, $subj, $mark) = explode(',', $lines[$i]);
// Test for conditions
if ( !empty($stnr) && !empty($subj) && !empty($mark) ) {
// Do a lot of something lol
} else {
// Something was empty
}
}
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--- End Message ---
--- Begin Message ---
Hi gang:
Given:
http://www.webbytedd.com/bb/ice/
How can I play the movie inside the page instead of going to another page?
I know that I could use phpclasses, but that seems an overkill.
I think something like this --
$file_source = 'ice-fishing.mov';
$size = filesize($file_source,"","");
header('Pragma: public');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: must-revalidate, pre-check=0, post-check=0, max-age=0');
header('Content-Transfer-Encoding: none');
header("Content-type: video/quicktime");
header("Content-Length: " . $size);
-- but it's falling short.
Thanks for any help.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On 8/15/07, tedd <[EMAIL PROTECTED]> wrote:
> Hi gang:
>
> Given:
>
> http://www.webbytedd.com/bb/ice/
>
> How can I play the movie inside the page instead of going to another page?
>
> I know that I could use phpclasses, but that seems an overkill.
>
> I think something like this --
>
> $file_source = 'ice-fishing.mov';
> $size = filesize($file_source,"","");
>
> header('Pragma: public');
> header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
> header('Cache-Control: must-revalidate, pre-check=0, post-check=0,
> max-age=0');
> header('Content-Transfer-Encoding: none');
> header("Content-type: video/quicktime");
> header("Content-Length: " . $size);
>
> -- but it's falling short.
>
> Thanks for any help.
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
JavaScript?
Put a nice event listener that checks for click actions and do a swap
out of the innerHTML with the movie.
--- End Message ---
--- Begin Message ---
tedd wrote:
Given:
http://www.webbytedd.com/bb/ice/
How can I play the movie inside the page instead of going to another page?
I know that I could use phpclasses, but that seems an overkill.
I think something like this --
$file_source = 'ice-fishing.mov';
$size = filesize($file_source,"","");
header('Pragma: public');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: must-revalidate, pre-check=0, post-check=0,
max-age=0');
header('Content-Transfer-Encoding: none');
header("Content-type: video/quicktime");
header("Content-Length: " . $size);
-- but it's falling short.
Something like this...
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"
height="153" width="321">
<param name="src" value="ice-fishing.mov">
<param name="controller" value="true">
<param name="autoplay" value="true">
<embed src="ice-fishing.mov"
pluginspage="http://www.apple.com/quicktime/download/" controller="true"
autoplay="true" height="153" width="321">
</object>
I'm sure there are lots of tutorials on the web regarding the details -
I just nicked this code from
http://www.apple.com/trailers/fox/thesimpsonsmovie/trailer1_small.html
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
tedd wrote:
Hi gang:
Given:
http://www.webbytedd.com/bb/ice/
How can I play the movie inside the page instead of going to another page?
I know that I could use phpclasses, but that seems an overkill.
I think something like this --
$file_source = 'ice-fishing.mov';
$size = filesize($file_source,"","");
header('Pragma: public');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: must-revalidate, pre-check=0, post-check=0,
max-age=0');
header('Content-Transfer-Encoding: none');
header("Content-type: video/quicktime");
header("Content-Length: " . $size);
That would simply send the QT file to the browser, which would display
it sans HTML. If by "inside the page" you mean inside of your interface,
this is the opposite of what you want. You'll need to create an object tag.
But (since we're already off-topic) i'd suggest you check out the
anarchy media player:
http://an-archos.com/anarchy-media-player
This thing is wonderful. 5 stars! Grab the "Standalone Javascript for
non-WP sites" version.
brian
--- End Message ---
--- Begin Message ---
At 4:32 PM +0100 8/15/07, Stut wrote:
tedd wrote:
Given:
http://www.webbytedd.com/bb/ice/
How can I play the movie inside the page instead of going to another page?
I know that I could use phpclasses, but that seems an overkill.
I think something like this --
$file_source = 'ice-fishing.mov';
$size = filesize($file_source,"","");
header('Pragma: public');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: must-revalidate, pre-check=0, post-check=0,
max-age=0');
header('Content-Transfer-Encoding: none');
header("Content-type: video/quicktime");
header("Content-Length: " . $size);
-- but it's falling short.
Something like this...
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"
height="153" width="321">
<param name="src" value="ice-fishing.mov">
<param name="controller" value="true">
<param name="autoplay" value="true">
<embed src="ice-fishing.mov"
pluginspage="http://www.apple.com/quicktime/download/"
controller="true" autoplay="true" height="153" width="321">
</object>
I'm sure there are lots of tutorials on the web regarding the
details - I just nicked this code from
http://www.apple.com/trailers/fox/thesimpsonsmovie/trailer1_small.html
-Stut
-Stut:
That certainly works, --
http://www.webbytedd.com/bb/ice1/
-- but I was hoping for something in the php realm.
Thanks,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
Dear my friends,
This is the first time for me to use OOP concept of PHP. I wrote still a very
simple codes but it doesn't work as my manual book taught. the book titled
"MySQL/PHP Database Application" by Jay Greenspan say these lines should work
but in fact it don't work as expected.
Here is my code:
===============================
//pelangganbaru.php
<?php
require "koneksi.php";
$sqlnya="select country from countries";
$klas=new koneksi($sqlnya);
?>
===============================
//koneksi.php
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="generator" content="HTML Tidy for Linux/x86 (vers 31 October
2006), see www.w3.org">
</HEAD>
<BODY>
<?php
class koneksi{
$namakompie="127.0.0.1";
$un="root";
$pw="mysqlpw";
$sqlnya;
$kueri;
function koneksi($sqlnya){
echo "superclass koneksi dipanggil<br>";
$konek=mysql_connect("$namakompie","$un","$pw");
if ($konek){
echo "koneksi berhasil (connection succeeded)<br>";
$mybd=mysql_select_db("survey",$konek);
$kueri=mysql_query($sqlnya,$konek);
}else{
echo "I can't talk to the server<br>";
exit();
}
return $kueri;
}
}
?>
</BODY>
</HTML>
=====
Theoritically if Class "koneksi" is being initialized than it prints "koneksi
berhasil (connection succeeded)" but it doesn't.
Please tell me what is my mistake.
Thank you very much in advance.
--
Patrik Hasibuan <[EMAIL PROTECTED]>
Junior Programmer
--- End Message ---
--- Begin Message ---
what sort of error are you encountering ?
-nathan
On 8/15/07, Patrik Hasibuan <[EMAIL PROTECTED]> wrote:
>
> Dear my friends,
>
> This is the first time for me to use OOP concept of PHP. I wrote still a
> very simple codes but it doesn't work as my manual book taught. the book
> titled "MySQL/PHP Database Application" by Jay Greenspan say these lines
> should work but in fact it don't work as expected.
> Here is my code:
> ===============================
> //pelangganbaru.php
> <?php
> require "koneksi.php";
> $sqlnya="select country from countries";
> $klas=new koneksi($sqlnya);
> ?>
> ===============================
> //koneksi.php
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
> <HTML>
> <HEAD>
> <META name="generator" content="HTML Tidy for Linux/x86 (vers 31 October
> 2006), see www.w3.org">
>
> </HEAD>
>
> <BODY>
> <?php
> class koneksi{
> $namakompie="127.0.0.1";
> $un="root";
> $pw="mysqlpw";
> $sqlnya;
> $kueri;
>
> function koneksi($sqlnya){
> echo "superclass koneksi dipanggil<br>";
> $konek=mysql_connect("$namakompie","$un","$pw");
> if ($konek){
> echo "koneksi berhasil (connection succeeded)<br>";
> $mybd=mysql_select_db("survey",$konek);
> $kueri=mysql_query($sqlnya,$konek);
> }else{
> echo "I can't talk to the server<br>";
> exit();
> }
> return $kueri;
> }
>
> }
> ?>
> </BODY>
> </HTML>
> =====
>
> Theoritically if Class "koneksi" is being initialized than it prints
> "koneksi berhasil (connection succeeded)" but it doesn't.
>
> Please tell me what is my mistake.
>
> Thank you very much in advance.
> --
> Patrik Hasibuan <[EMAIL PROTECTED]>
> Junior Programmer
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
> Theoritically if Class "koneksi" is being initialized than it
> prints "koneksi berhasil (connection succeeded)" but it doesn't.
What "does" it? Just nothing? No warnings at all? Possibly disabled?
so far
rob
--- End Message ---
--- Begin Message ---
A few missing pieces in your code. Take a look below within your class. I
corrected it.
try also using include_once instead of require
and make sure that your error level and reporting are turned on so you can see
what is happening.
Patrik Hasibuan wrote:
Dear my friends,
This is the first time for me to use OOP concept of PHP. I wrote still a very simple
codes but it doesn't work as my manual book taught. the book titled "MySQL/PHP
Database Application" by Jay Greenspan say these lines should work but in fact it
don't work as expected.
Here is my code:
===============================
//pelangganbaru.php
<?php
require "koneksi.php";
$sqlnya="select country from countries";
$klas=new koneksi($sqlnya);
?>
===============================
//koneksi.php
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META name="generator" content="HTML Tidy for Linux/x86 (vers 31 October 2006), see
www.w3.org">
</HEAD>
<BODY>
<?php
class koneksi{
$namakompie="127.0.0.1";
var $namakompie='127.0.0.1';
$un="root";
var $un='root';
$pw="mysqlpw";
var $pw='mysqlpw';
$sqlnya;
var $sqlnya;
$kueri;
var $kueri;
function koneksi($sqlnya){
echo "superclass koneksi dipanggil<br>";
$konek=mysql_connect("$namakompie","$un","$pw");
$konek=mysql_connect($this->namakompie, $this->un, $this->pw);
if ($konek){
echo "koneksi berhasil (connection succeeded)<br>";
$mybd=mysql_select_db("survey",$konek);
$kueri=mysql_query($sqlnya,$konek);
}else{
echo "I can't talk to the server<br>";
exit();
}
return $kueri;
}
}
?>
</BODY>
</HTML>
=====
Theoritically if Class "koneksi" is being initialized than it prints "koneksi
berhasil (connection succeeded)" but it doesn't.
Please tell me what is my mistake.
Thank you very much in advance.
--
Jim Lucas
"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."
Twelfth Night, Act II, Scene V
by William Shakespeare
--- End Message ---
--- Begin Message ---
My users are having problems downloading .doc or .xls files linked to from PHP
pages; when they click on the link, IE returns an error stating that the file
cannot be found. Firefox, however, seems to be able to find the file and
open it just fine.
From what I can tell, this is related to a known IE issue which prevents users
from being able to download files from a secure site if the headers on the
page are set to prevent caching. However, our site is not a secure site, nor
do we have headers which prevent caching.
This has been bugging me for weeks. I advise our users to use Firefox, but
not all of them are able to do so; and since they pay our bills, we don't
have much of an option.
If anyone has any ideas, I'd appreciate hearing them.
--
Richard S. Crawford
Editor-in-chief, Daikaijuzine (http://www.daikaijuzine.com)
Personal website: http://www.mossroot.com
http://www.myspace.com/underpope / underpope.livejournal.com
"We are here to help each other get through this thing, whatever it is."
(Kurt Vonnegut, 1922 - 2007)
--- End Message ---