php-general Digest 27 Jun 2008 05:55:06 -0000 Issue 5536
Topics (messages 275993 through 276026):
Re: Inspiration for a Tombstone.
275993 by: Christoph Boget
275995 by: Dan Shirah
275996 by: Edward Kay
275997 by: Daniel Brown
275998 by: Dan Shirah
276000 by: Christoph Boget
276001 by: Daniel Brown
276002 by: Dan Shirah
276003 by: tedd
276004 by: Bastien Koert
276005 by: tedd
276006 by: Thiago H. Pojda
276007 by: Boyd, Todd M.
276008 by: Robert Cummings
276009 by: Dotan Cohen
276010 by: Robert Cummings
276011 by: Robert Cummings
276012 by: David Giragosian
276013 by: Dotan Cohen
276015 by: Jason Murray
276016 by: Robert Cummings
276017 by: Jason Murray
276018 by: Daniel Brown
Re: [PHP-DB] php upload questions --move_uploaded_file
275994 by: Daniel Brown
Re: iconv() problem
275999 by: Stefano Noffke
Re: exec() Error
276014 by: Jason Murray
Re: prepared statement
276019 by: ctx2002
276022 by: Chris
lester
276020 by: inf200528.ucf.edu.cu
276021 by: Daniel Brown
276023 by: Dan Joseph
276024 by: tedd
de lester
276025 by: inf200528.ucf.edu.cu
276026 by: Jim Lucas
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 ---
> "Always on the edge of greatness"
"Tripped on his way to the edge of greatness"
thnx,
Christoph
--- End Message ---
--- Begin Message ---
<?php
include 'connection.php';
$inquire = "SELECT COUNT(*) FROM heartbeat WHERE user_name = 'Dan'";
$count = ifx_query ($inquire, $connect_id);
$rowcount = ifx_fetch_row($count);
$pulse = $rowcount['total'];
if ($heartbeat > 0) {
echo "_/\^___/\^____/\^___";
} else {
echo "________________";
}
?>
--- End Message ---
--- Begin Message ---
>
> What would you like on your Tombstone? (<-- that's actually a
> trademarked saying)
>
I've always liked Spike Milligan's:
"I told you I was ill"
:)
http://news.bbc.co.uk/1/hi/england/southern_counties/3742443.stm
Edward
--- End Message ---
--- Begin Message ---
2008/6/26 Dan Shirah <[EMAIL PROTECTED]>:
> <?php
> include 'connection.php';
> $inquire = "SELECT COUNT(*) FROM heartbeat WHERE user_name = 'Dan'";
> $count = ifx_query ($inquire, $connect_id);
> $rowcount = ifx_fetch_row($count);
> $pulse = $rowcount['total'];
>
> if ($heartbeat > 0) {
> echo "_/\^___/\^____/\^___";
> } else {
> echo "________________";
> }
> ?>
We're sorry, Otherdan. Hell is not compatible with Informix.
--
</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 ---
if ($user_name = "Dan Brown") {
echo "GOING DOWN?!";
} else {
echo "Welcome to Heaven";
}
On 6/26/08, Daniel Brown <[EMAIL PROTECTED]> wrote:
>
> 2008/6/26 Dan Shirah <[EMAIL PROTECTED]>:
> > <?php
> > include 'connection.php';
> > $inquire = "SELECT COUNT(*) FROM heartbeat WHERE user_name = 'Dan'";
> > $count = ifx_query ($inquire, $connect_id);
> > $rowcount = ifx_fetch_row($count);
> > $pulse = $rowcount['total'];
> >
> > if ($heartbeat > 0) {
> > echo "_/\^___/\^____/\^___";
> > } else {
> > echo "________________";
> > }
> > ?>
>
> We're sorry, Otherdan. Hell is not compatible with Informix.
>
> --
> </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 ---
> if ($user_name = "Dan Brown") {
> echo "GOING DOWN?!";
> } else {
> echo "Welcome to Heaven";
> }
So I guess that means we're all on the express elevator down. Looks
like it'll get awfully full... :p
thnx,
Chris
--- End Message ---
--- Begin Message ---
On Thu, Jun 26, 2008 at 11:29 AM, Christoph Boget
<[EMAIL PROTECTED]> wrote:
>> if ($user_name = "Dan Brown") {
>> echo "GOING DOWN?!";
>> } else {
>> echo "Welcome to Heaven";
>> }
>
> So I guess that means we're all on the express elevator down. Looks
> like it'll get awfully full... :p
Yeah, he keeps forgetting his second =. ;-P
That means you're also going to all be renamed to Dan Brown. It's
sure as hell going to get confusing in that packed elevator....
--
</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 ---
if ($user_name == "Dan S") {
echo "Quit while you're ahead";
}
exit;
--- End Message ---
--- Begin Message ---
At 9:49 AM -0500 6/26/08, Boyd, Todd M. wrote:
I want something like "Download complete"
I would prefer "Upload complete". :-)
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On Thu, Jun 26, 2008 at 10:51 AM, Eric Butera <[EMAIL PROTECTED]> wrote:
> [snip]
>
> echo "Fatal error: Maximum execution time of {$duration} seconds exceeded";
> [/snip]
>
That's awesome
how about
<?php
die('All Done');
?>
--
Bastien
Cat, the other other white meat
--- End Message ---
--- Begin Message ---
Or
unlink('tedd');
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
trigger_error('B-bye');
On Thu, Jun 26, 2008 at 12:45 PM, tedd <[EMAIL PROTECTED]> wrote:
>
> Or
>
> unlink('tedd');
>
>
> 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
>
>
--
Thiago Henrique Pojda
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: tedd [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2008 10:45 AM
> To: php php
> Subject: Re: [PHP] Inspiration for a Tombstone.
>
> Or
>
> unlink('tedd');
I think that would've already been done, eh? ;)
Todd Boyd
Web Programmer
--- End Message ---
--- Begin Message ---
On Thu, 2008-06-26 at 11:01 -0400, Christoph Boget wrote:
> > "Always on the edge of greatness"
>
> "Tripped on his way to the edge of greatness"
"I'm leaching into the water supply."
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
2008/6/26 tedd <[EMAIL PROTECTED]>:
> Hi gang:
>
> For a break in our normal serious thinking, I suggested tombstone wit of:
>
> "Always on the edge of greatness"
>
> Dan offered:
>
> </cruelWorld> or </Dan> or
>
> <?php
> function dan($dateOfDeath) {
> return "Daniel P. Brown: 01-01-1970 - ".$dateOfDeath";
> }
> die(dan('00-00-0000'));
> ?>
>
> What would you like on your Tombstone? (<-- that's actually a trademarked
> saying)
>
What's wrong with a simple Heptadecagon?
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 ---
On Thu, 2008-06-26 at 20:06 +0300, Dotan Cohen wrote:
> 2008/6/26 tedd <[EMAIL PROTECTED]>:
> > Hi gang:
> >
> > For a break in our normal serious thinking, I suggested tombstone wit of:
> >
> > "Always on the edge of greatness"
> >
> > Dan offered:
> >
> > </cruelWorld> or </Dan> or
> >
> > <?php
> > function dan($dateOfDeath) {
> > return "Daniel P. Brown: 01-01-1970 - ".$dateOfDeath";
> > }
> > die(dan('00-00-0000'));
> > ?>
> >
> > What would you like on your Tombstone? (<-- that's actually a trademarked
> > saying)
> >
>
* What's wrong with a simple Heptadecagon?
It'll look like a circle on your tombstone... why not use a star
instead? :B
Cheers,
Rob.
>
> 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?
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
On Thu, 2008-06-26 at 11:33 -0500, Boyd, Todd M. wrote:
> > -----Original Message-----
> > From: tedd [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 26, 2008 10:45 AM
> > To: php php
> > Subject: Re: [PHP] Inspiration for a Tombstone.
> >
> > Or
> >
> > unlink('tedd');
>
> I think that would've already been done, eh? ;)
Crap, better run fsck() on reality, we've got stale i-nodes.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
My favorite vi command:
e! Damn it. e!
--- End Message ---
--- Begin Message ---
2008/6/26 Robert Cummings <[EMAIL PROTECTED]>:
> * What's wrong with a simple Heptadecagon?
>
> It'll look like a circle on your tombstone... why not use a star
> instead? :B
>
I wasn't sure that anyone else would be familiar with the idea. Nice!
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 ---
I'm thinking:
<?php
header("HTTP/1.1 410 Gone");
die();
?>
Regards,
Jason
On Thu, Jun 26, 2008 at 1:54 PM, David Giragosian <[EMAIL PROTECTED]> wrote:
>
> My favorite vi command:
>
> e! Damn it. e!
--- End Message ---
--- Begin Message ---
On Thu, 2008-06-26 at 14:54 -0400, Jason Murray wrote:
> I'm thinking:
>
> <?php
> header("HTTP/1.1 410 Gone");
> die();
> ?>
What about a 404? >:)
<?php
header( 'HTTP/1.1 404 Body Not Found' );
?>
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
Body not found? Who do you think I am? Jesus?
On Thu, Jun 26, 2008 at 3:01 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Thu, 2008-06-26 at 14:54 -0400, Jason Murray wrote:
>> I'm thinking:
>>
>> <?php
>> header("HTTP/1.1 410 Gone");
>> die();
>> ?>
>
> What about a 404? >:)
>
> <?php
>
> header( 'HTTP/1.1 404 Body Not Found' );
>
> ?>
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
--- End Message ---
--- Begin Message ---
On Thu, Jun 26, 2008 at 3:12 PM, Jason Murray <[EMAIL PROTECTED]> wrote:
> Body not found? Who do you think I am? Jesus?
Oh, Jason Christ....
--
</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 ---
Hai,
I'm forwarding this email over to the PHP-General list, since it's
not database-related. If you're not already subscribed there, please
subscribe and I'm sure you'll get some responses.
ORIGINAL MESSAGE FOLLOWS:
On Thu, Jun 26, 2008 at 6:21 AM, Liu, Hai Tao (Taylor)
<[EMAIL PROTECTED]> wrote:
> Hi all:
>
> I meet a very strange problem about php upload.
> Usually, we use move_uploaded_file to upload, but it could not work in
> flex use php to upload.
> Same Php upload code can work in html page, and move_uploaded_file
> function will return 1;
> But it could not work in flex, and move_uploaded_file function return
> nothing.
> I wonder if PHP have some restriction? Has anyone meet such problems?
> Thank you very much!
>
>
> Flex upload code:
> file = new FileReference();
> ......
> var request:URLRequest = new
> URLRequest("http://www.a.com/upload.php");
> .......
> file.upload(request);
>
> Php code:
>
> <?php
>
> $uploadFolder = $_SERVER['DOCUMENT_ROOT']."/previews/order/"; //
> upload folder
> $destFileName = $_REQUEST['fileName'];
> $dest = $uploadFolder.$destFileName;
>
> if (sizeof($_FILES)==0) {
> echo "no file";
> }
>
> $f=array_pop($_FILES);
> echo $f['tmp_name']."<br>" ;
> error_log($uploadFolder."\r\n", 3,
> $_SERVER['DOCUMENT_ROOT']."/FileService.log");
> error_log($f['tmp_name'].'::'.$f['name']."\r\n", 3,
> $_SERVER['DOCUMENT_ROOT']."/FileService.log");
> error_log((is_uploaded_file($f['tmp_name'])?"true":"false")."\r\n",
> 3, $_SERVER['DOCUMENT_ROOT']."/FileService.log"); //////// return
> true here!
>
> echo $dest;
> $r = move_uploaded_file($f['tmp_name'],$dest);
>
> error_log("uploadresult--".$r."--\r\n", 3,
> $_SERVER['DOCUMENT_ROOT']."/FileService.log");
> chmod($dest,0777);
> ?>
> Thank!
> Luna
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
</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 ---
Nevermind...
I made a mistake. I was actually parsing the string two times;
therefore, the source string was not encoded as ISO-8859 anymore the
second time.
It is working fine now...
Stefano
Stefano Noffke ha scritto:
Greetings,
I have a problem with iconv(), and I need help solving it.
Here is the background:
I have a Web page with a Form that saves data to a MySQL database. I
need to retrieve the data from the database and create a PDF document
with FPDF.
The Web Page, the database, and the browser are all set to UTF-8, so I
have to convert the data from the database to ISO-8859-1 in order to
have FPDF show it correctly. I am using iconv() to convert the data.
It works like a charm for the data acquired with text boxes, but it does
not parse the data acquired from textareas correctly.
For example:
I have an text input (<input type="text" />) and a textarea
(<textarea></textarea>).
I type the string "sometextàèìòùésomeothertext" on both the input fields
and save it into the database through POST.
If I retrieve the data and show it on a web page, it shows correctly. I
then create the PDF with FPDF parsing the data with the following
instructions:
iconv("UTF-8", "ISO-8859-1", $inputText)
iconv("UTF-8", "ISO-8859-1//TRANSLIT", $textarea) or iconv("UTF-8",
"ISO-8859-1", $textarea)
The PDF shows the first record correctly, while the second only shows
"sometext"
If I use
iconv("UTF-8", "ISO-8859-1//IGNORE", $textarea)
the PDF shows "sometextsomeothertext" skipping all the special chars.
Why is the textarea behaving differently than the text input? Is there a
way to fix this?
I would really appreciate any help, thank you.
Stefano
--- End Message ---
--- Begin Message ---
Alice,
If you are already set 755 on the CGI, it looks like it might be a webserver
configuration issue.
If you are using Apache (I'm assuming you are) you might want to take a look
at
http://httpd.apache.org/docs/2.0/howto/cgi.html#configuringapachetopermitcgi
for some hints on how to make sure that the server configuration is proper
for using CGI scripts.
Regards
Jason
On Thu, Jun 26, 2008 at 8:50 AM, Wei, Alice J. <[EMAIL PROTECTED]> wrote:
> Hi, Todd:
>
> It looks like I have some other errors in my Perl code, and I got it
> fixed, switched the permission to 755, and made attempts to call it using
> cURL through my working PHP script.
>
> Here is the code:
>
> // create a new cURL resource
> $ch = curl_init();
>
> // set URL and other appropriate options
> curl_setopt($ch, CURLOPT_URL, "http://192.168.10.63/total.cgi");
> curl_setopt($ch, CURLOPT_HEADER, false);
>
> // grab URL and pass it to the browser
> curl_exec($ch);
>
> // close cURL resource, and free up system resources
> curl_close($ch);
>
> This time, I do not get the "script" output from the script in total.cgi,
> but I got
>
> Forbidden
> You don't have permission to access /total.cgi on this server.
>
> I have switched the permission to both scripts at both servers. Is there
> something wrong I have done here?
>
> Thanks again for your help.
>
> Alice
> ======================================================
> Alice Wei
> MIS 2009
> School of Library and Information Science
> Indiana University Bloomington
> [EMAIL PROTECTED]
> ________________________________________
> From: Boyd, Todd M. [EMAIL PROTECTED]
> Sent: Wednesday, June 25, 2008 5:07 PM
> To: Wei, Alice J.; [EMAIL PROTECTED]
> Subject: RE: Re: [PHP] exec() Error
>
> > -----Original Message-----
> > From: Wei, Alice J. [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 25, 2008 3:31 PM
> > To: Boyd, Todd M.; Per Jessen; [EMAIL PROTECTED]
> > Subject: RE: Re: [PHP] exec() Error
>
> ---8<--- snip
>
> > > Well, "http://www.mysite.com/calculate.php" is not an executable.
> > Try
> > > this instead:
> > >
> > > exec("php <path>/calculate.php");
> >
> > I still don't think this is how exec() should be used when executing
> > remote PHP scripts via HTTP, since the web server is not going to give
> > you the underlying code simply because you're calling the URL from PHP
> > and not your web browser. User-Agent tags do not a secure connection
> > make.
> >
> > Perhaps doing a wget and directing it to /dev/null (if you're on *nix)
> > would be appropriate to invoke a remote script and pass it parameters.
> > Hell, even wget to standard output if you want, and use that as your
> > "result code." It's basically doing what cURL does, but outside of the
> > PHP script itself.
> >
> > Anyway, I digress. My point is that exec("php
> > http://mysite.com/script.php") will fail, since it will be reading the
> > remote script's OUTPUT, and not the remote script's SOURCE CODE.
> >
> > I dont' know how come his code works either. I figured that exec()
> > is not going to get me anywhere when I have it stored remotely.
> > I am now using cURL instead of using exec(), since it is doing a
> lot
> > closer to what I initiated. I am not sure if I should have a new
> thread
> > for this, but I found that things start to get a little weird when I
> > tried to do cURL with Perl files inside. The PHP only brings me back
> > Perl code and not the processed content. Is this something I should
> not
> > be doing with cURL? It seems to do quite a bit of powerful processing
> > when I wrote everything in PHP and have it stored remotely.
>
> Alice,
>
> If it's returning the code instead of the processed content, then it
> means that the webserver which houses the Perl script is not
> executing/parsing it. You should check with the administrator of the
> remote webserver to see if they have a Perl module installed, and if it
> is configured properly for your web app.
>
> HTH,
>
>
> Todd Boyd
> Web Programmer
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
thanks for answering my question.
I have checked PHP PDO doc.
PDO:: query() can send a query to server.
my question is, does PDO:: query() generates prepared statement
automatically?
or I have to explicitly call PDO:: prepare() to use prepared statement?
for example:
PDO:: query("select name from contact where id = 1") will send a raw SQL
statement
to server, and server also treat that query as a raw SQL statement.
regards
--
View this message in context:
http://www.nabble.com/prepared-statement-tp18123270p18142905.html
Sent from the PHP - General mailing list archive at Nabble.com.
--- End Message ---
--- Begin Message ---
ctx2002 wrote:
> thanks for answering my question.
>
> I have checked PHP PDO doc.
> PDO:: query() can send a query to server.
> my question is, does PDO:: query() generates prepared statement
> automatically?
> or I have to explicitly call PDO:: prepare() to use prepared statement?
You have to use prepare/execute to get prepared statements.
Query does a straight query (same as mysql_query or pg_query or whatever
else you're using).
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
I need to know the duration of a movie,
I found a formula that did not use any role php but I
lost.�
I accept all kinds of suggestions
Lester..Univ de Cienfuegos..Informatica 3 A�o
(*_*)>>>"Todos somos muy ignorantes. Lo que ocurre es que no todos
ignoramos las mismas cosas"<<<(*_*)
--------------------------------
Servicio del Grupo de Redes
Universidad de Cienfuegos
Contacto: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
On Thu, Jun 26, 2008 at 5:37 PM, <[EMAIL PROTECTED]> wrote:
>
>
>
> I need to know the duration of a movie,
> I found a formula that did not use any role php but I
> lost.
> I accept all kinds of suggestions
Yes.
--
</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 ---
On Thu, Jun 26, 2008 at 5:37 PM, <[EMAIL PROTECTED]> wrote:
>
>
>
> I need to know the duration of a movie,
> I found a formula that did not use any role php but I
> lost.
> I accept all kinds of suggestions
>
>
> Lester..Univ de Cienfuegos..Informatica 3 Año
> (*_*)>>>"Todos somos muy ignorantes. Lo que ocurre es que no todos
> ignoramos las mismas cosas"<<<(*_*)
>
>
>
>
>
> --------------------------------
> Servicio del Grupo de Redes
> Universidad de Cienfuegos
> Contacto: [EMAIL PROTECTED]
>
Hi,
"Meet The Parents" is 1 hr, 48 minutes.
Hope that helps!
--
-Dan Joseph
www.canishosting.com - Plans start @ $1.99/month.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."
--- End Message ---
--- Begin Message ---
At 5:37 PM -0400 6/26/08, [EMAIL PROTECTED] wrote:
I need to know the duration of a movie,
I accept all kinds of suggestions
Okay, it depends on how long the movie is.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
� I am working with videos and I need to Know how I can obtain the duration
of the videos
�I had a formula that did not need any�function
of�php, but i lost de page,� please i need any help with this.
Sorry for my english, i am from Cuba.
Lester..Univ de Cienfuegos..Informatica 3 A�o
(*_*)>>>"Todos somos muy ignorantes. Lo que ocurre es que no todos
ignoramos las mismas cosas"<<<(*_*)
--------------------------------
Servicio del Grupo de Redes
Universidad de Cienfuegos
Contacto: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
� I am working with videos and I need to Know how I can obtain the duration
of the videos
�I had a formula that did not need any�function
of�php, but i lost de page,� please i need any help with this.
Sorry for my english, i am from Cuba.
Lester..Univ de Cienfuegos..Informatica 3 A�o
(*_*)>>>"Todos somos muy ignorantes. Lo que ocurre es que no todos
ignoramos las mismas cosas"<<<(*_*)
--------------------------------
Servicio del Grupo de Redes
Universidad de Cienfuegos
Contacto: [EMAIL PROTECTED]
Here is a link to something that might get you started. Looks like this
is only for AVI format. It is from a while back and I have no idea if
it even works. Use at your own risk.
http://www.hotscripts.com/Detailed/19061.html
Looking at the script, they are doing the following to figure the duration
My guess would be that 'r' in the v_frames array is the total number of
frames in the video. They take that and divide by the frames per second
$aviinfo['duration'] = ($aviinfo['v_frames']['r'] / $aviinfo['v_fps']);
Look simple/logical enough. You just need to know how to extract the
total frame count and the frames per second. My guess is is that each
format that you want to figure the duration for is going to have a
different way of storing the data for FPS & total frames.
Good luck!
--- End Message ---