For Programmers: Free Programming Magazines  


Home > Archive > PERL Programming > July 2007 > pnm strip player help









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author pnm strip player help
Byron

2007-02-21, 7:00 pm

Begging your pardon, :) but I sure could use a little help. I have a
script here that was given to me by a friend of a friend :) And the
middle person knows just as much as I do about cgi/perl, which is
nothing. I know just enough to make this script work at my server (after
several, and I mean several attempts) But whether it is scripted
correctly, I don't know. What I mean, where a line ends and a new line
begins. I do know that a semi-colon ends the line. And can you tell me
the reason for these

||

Some I removed and a couple HAD to stay in. Does that sound correct?

Any help sure would be appreciated.

#!/usr/bin/perl -w
# name script 'pnm.pl'
use CGI;
my $q = new CGI;
my $Song = $q->param('song')
|| '';if ($Song eq '') {print "Content-type: text/||html\n\n";
print qq~<html><head><title>PNM ||Launcher</title></head><body><form
name="f" id="f" ||method="post" action="pnm.pl">URL <input ||type="text"
name="song" id="song" value="" ||size="50" maxlength="300"
/></form></body></html> ||~;}else {chomp($Song);print "Content-type:
||audio/x-pn-realaudio-plugin\n\n";print("$Song\n");}

Joe Smith

2007-02-21, 7:00 pm

Byron wrote:
> I don't know. What I mean, where a line ends and a new line
> begins. I do know that a semi-colon ends the line. And can you tell me
> the reason for these
>
> ||
>
> Some I removed and a couple HAD to stay in. Does that sound correct?
>
> Any help sure would be appreciated.


my $Song = $some_variable || ''; # Set $Song to '' if not otherwise defined.

> #!/usr/bin/perl -w
> # name script 'pnm.pl'
> use CGI;
> my $q = new CGI;
> my $Song = $q->param('song')
> || '';if ($Song eq '') {print "Content-type: text/||html\n\n";
> print qq~<html><head><title>PNM ||Launcher</title></head><body><form
> name="f" id="f" ||method="post" action="pnm.pl">URL <input ||type="text"
> name="song" id="song" value="" ||size="50" maxlength="300"
> /></form></body></html> ||~;}else {chomp($Song);print "Content-type:
> ||audio/x-pn-realaudio-plugin\n\n";print("$Song\n");}


Get rid of all the other instances of || and start a new line after each ; .
The last statement {print("$Song\n");} doesn't really do anything.

-Joe

Byron

2007-02-21, 7:00 pm

He Joe, I think this is the changes you wanted me to do. I tried making
the changes but I kept getting errors. I'm sure it was a coding error on
my part.

>#!/usr/bin/perl -w
>use CGI::Carp qw(fatalsToBrowser);
># name script 'pnm2.pl'
>use CGI;
>my $q =3D new CGI;
>my $Song =3D $some_variable || ''; =A0
># Set $Song to '' if not otherwise defined.
>if ($Song '')


I had to leave this print in from the bottom:

print("$Song\n");

or I would loose my form url after I clicked onto it.

And if I removed these || from the
|| method=3D"post"

I loose the encrypted song url that the server generates.

I think you'll understand better with what is going on with an example.

This is how I have it coded now. And it seems to be working ok. Please
correct me on any mistakes if there wrong.

http://www.byrondallas.p4h.biz/test/pnm2.txt

This is the tool:

http://www.byrondallas.p4h.biz/test/pnm2.pl

If you will paste the strip below into the tool and click onto it, you
will be able to get the encrypted clickable url. I click "Show Last" on
webtv. It also allows me to time the song from an archive list. Just
click off the form and then back up to change the time settings.

rtsp://archive.wfmu.org/archive/GK/gk041218.rm?start=3D"01:55:18"&end=3D"0=
1:57:52"

I don't know if the code is correct, I just know that's what I had to do
to get the tool to perform. Do you see any problems with this? and if so
please correct me. :) I wasn't sure about these || and was worried about
deleting some and leaving some.

Thanks Joe!

Joe Smith

2007-02-22, 4:00 am

Byron wrote:

> I removed these || from the
> || method="post"
> I loose the encrypted song url that the server generates.


The || there is wrong. It should be either
<form method="GET" ...>
or
<form method="POST" ...>
and it sounds like the latter is what you don't want.

> I had to leave this print in from the bottom:
> print("$Song\n");
> or I would loose my form url after I clicked onto it.


Well, "print "DarkSideOfTheMoon.mp3\n" won't do anything.

> rtsp://archive.wfmu.org/archive/GK/gk041218.rm?start="01:55:18"&end="01:57:52"


Oh, that's different.

> Content-type: audio/x-pn-realaudio-plugin


Sorry, I can't help you with that.
-Joe
Byron

2007-02-22, 7:59 am

Joe wrote:

>The || there is wrong. It should be either =A0
><form method=3D"GET" ...>
>or
>=A0=A0<form method=3D"POST" ...>
>and it sounds like the latter is what you don't
>want.


Thanks Joe, this is how the line looks now and it seems to be working
fine.

<form name=3D"f" id=3D"f" method=3D"get" action=3D"pnm3.pl">

http://byrondallas.p4h.biz/test/pnm3.pl

And it generates the incrypted url for me.

rtsp://archive.wfmu.org/archive/SO/so021110.rm?start=3D"1:32:21"&end=3D"1:=
35:21"

http://byrondallas.p4h.biz/test/pnm...archive.wfmu.o=
rg%2Farchive%2FSO%2Fso021110. rm%3Fstart%3D%221%3A32%3A21%22%26end%3D%
221%3=
A35%3A21%22

Now I'll see what I can do about the print line.

Byron

2007-02-22, 7:00 pm

I'm sorry Joe, I meant the line is like this: (uppercase)

<form name="f" id="f" method="GET" action="pnm3.pl">

Byron

2007-02-22, 7:00 pm

Hey Joe, the bottom line on pnm4 reads like this after removing
print("$Song\n");

print "Content-type: audio/x-pn-realaudio-plugin\n\n";
}

This is the player without the print line.
http://www.byrondallas.p4h.biz/test/pnm4.pl

I'm not sure if your on a computer or WebTV. But on WebTV when I copy
this strip into the form and click it, it seems to play the strip and
even gives me the encrypted url, but I can't hear anything.

rtsp://archive.wfmu.org/archive/SO/so021110.rm?start="1:32:21"&end="1:35:21"

It may just be a WebTV thing???

and the line:
"Content-type: audio/x-pn-realaudio-plugin\n\n";
}

is the the type of audio plugin WebTV uses. Which you probably guessed
it anyway. :)

Byron

2007-02-23, 7:02 pm

Hey Joe, I really appreciate all the help you've given me. I don't know
if your into Pink Floyd or not, but you did make mention of them, so
here ya go.

http://www.byrondallas.p4h.biz/audi...Wall_Side-2.ram

Kronik

2007-03-23, 11:18 am

Catherine Zeta Jone Throatjob!
http://Catherine-Zeta-Jone-Throatjo...hp?movie=148803
Jeremia

2007-05-11, 1:44 am

Celine Dion facestanding movies!
http://Celine-Dion-facestanding-mov...hp?movie=726648
Vendela

2007-06-11, 1:58 am

Carmen Electra and Halle Berry With Wired Snatch!
http://www.britneyraped.com/Player?vid=726648

free sex movie net free asian sex pic anal sex video black sex gallery first time sex com
paris hilton new sex video lesbian sex clip asian sex cam free sex move lesbian sex movie
gay teen sex black sex site anal sex young online sex video free teen sex pic
Adedterdickder

2007-06-13, 11:26 pm

Halle Berry and Halle Berry Having Fun On The Piano!
http://www.WatchingTheTube.com/Wind...hp?movie=726648


funny joke picture video america funny video funny office video clip free funny sex video funny bush video
http://635-funny-video.info/funny-g...bush-video.html http://635-funny-video.info/extreme...sexy-video.html http://635-funny-video.info/free-sh...unny-video.html http://635-funny-video.info/funny-video-clip.html http://635-funny-video.info/funny-flash-video.html
Rogan

2007-06-20, 1:15 pm

Cameron Diaz and Catherine Z. Jones Vibrating In Slits!
http://www.shockingtheworld.com/c?vid=1673286


free funny home video funny music video bloopers bush funny video adult video pic funny america funny home video
http://635-funny-video.info/free-do...sexy-funny.html http://635-funny-video.info/funny-fart-video.html http://635-funny-video.info/funny-a...video-clip.html http://635-funny-video.info/funny-video-game-video.html http://635-funny-video.info/funny-tube-u-video.html
Jkcxx

2007-07-01, 10:29 pm

Petit brunette dikcs herself with a huge d|ldo
http://girls-with-toys.info/gallery.php?id=218571
Smidge

2007-07-03, 6:56 pm

UNCENSORED P0RN VIDEOS!
http://uncensored-p0rn.info/free/218571/
153

2007-07-15, 5:14 pm

Paris Hilton and Hilary Swank Go Lesbian!
http://www.reyrewh.com/Watch?clip=148803

Paula Abdul and Alyssa Milano Go Lesbian!
http://www.reyrewh.com/PlayMovie.wmv?watch=148803

Tara Reid and Ashlee Simpson Machine XXXX!
http://www.reyrewh.com/Player?watch=148803

Jennifer Aniston and Christina Applegate playing with each other on film!
http://www.reyrewh.com/player.php?movie=148803

Hilary Duff and Jessica Simpson , Lesbian Girl Sex!
http://www.reyrewh.com/MediaPlayer.php?q=148803
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com