Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Including perl in a html page.
Old 01-22-2007, 10:09 PM Including perl in a html page.
Novice Talker

Posts: 7
Name: Andrew
Trades: 0
Hi guys,

Im pretty new to all this PHP, PERL, ASP ect. I have only just got used to HTML with the help of dreamweaver though.

I have set up a website here and would like to place an advertising space on it. The website is written in HTML throughout. I have registered with a link broker "backlinks.com" and they require me to paste dynamic scrips into my page so that the process of displaying the links is automated.

The bit I dont understand is how I get the code to work in my webpage. I do have a choice on what code to use though, PHP, ASP, ASP.NET and perl. I know that I am able to use perl as it tells me in cpanel the path to perl, as for the others I'm sure I cant use because im only a bronze member for my hosting.

Ok guys... this pretty much is all I can ask questions on because my knowledge is so limited, but here is the code that backlinks.com want me to get to work on my site (without "s)

"# ************************************************** ******************
# Paste this block of code on your web page where you would like text
# links to be displayed. This code will dynamically add and remove text
# links on your web page according to your BackLinks.com settings.
# ************************************************** ******************
# The following variable defines whether links are opened in a new window
# (1 = Yes, 0 = No)
my $OpenInNewWindow = "1";
# ************************************************** ******************
# Please DO NOT modify anything below
# ************************************************** ******************
my $BLKey = "B563-039H-2YF6";
use LWP::Simple;
use URI::Escape;
my $QueryString;
$QueryString = "LinkUrl=".uri_escape((($ENV{'HTTPS'} eq 'on')?'https://':'http://').$ENV{'HTTP_HOST'}.$ENV{'REQUEST_URI'});
$QueryString .= "&Key=" .uri_escape($BLKey);
$QueryString .= "&OpenInNewWindow=" .uri_escape($OpenInNewWindow);
#Make request
my $backlinks_content = get("<A href="http://www.backlinks.com/engine.php?".$QueryString">http://www.backlinks.com/engine.php?".$QueryString);
if($backlinks_content) {
print $backlinks_content;
}"

Hope you can help guys, and thanks
90awk is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-22-2007, 10:35 PM Re: Including perl in a html page.
Tom_M's Avatar
Ultra Talker

Posts: 250
Name: Tom Maurer
Location: Pennslvania, USA
Trades: 0
I can only speak for ASP and PHP. In order to to code in an HTML file, you have to change the extension as well. This means your file would end in .php or .asp in order for the code to work.

All you have to do is add the code and change the file extension. I believe Perl is the same. The file extension has to be .pl maybe?
Tom_M is offline
Reply With Quote
View Public Profile
 
Old 01-22-2007, 11:48 PM Re: Including perl in a html page.
Novice Talker

Posts: 7
Name: Andrew
Trades: 0
So I dont have to do anything else? all the HTML within the page remains the same, I just add the code and change the filename from index.html to index.pl ?

So say I opened my index.html file with dreamweaver inserted the code *as it is above* to where I wanted it to show and then save the file as index.pl ?

That would work?
90awk is offline
Reply With Quote
View Public Profile
 
Old 01-23-2007, 12:01 AM Re: Including perl in a html page.
Novice Talker

Posts: 7
Name: Andrew
Trades: 0
ok that didnt work, displayed:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@notts-counselling.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
90awk is offline
Reply With Quote
View Public Profile
 
Old 01-23-2007, 12:44 AM Re: Including perl in a html page.
carterdea's Avatar
Ultra Talker

Posts: 353
Location: Arizona
Trades: 0
I think you should put this in the Coding Area.

They might know a little bit more.

Hope you get it solved!
carterdea is offline
Reply With Quote
View Public Profile Visit carterdea's homepage!
 
Old 01-23-2007, 01:27 AM Re: Including perl in a html page.
Novice Talker

Posts: 7
Name: Andrew
Trades: 0
Thanks tom_m for your suggestion, but it didnt work, I also tried something I researched, but that didnt work either.

I looked at using php and put an include in my index.html pointing to the code I had saved as a php file, nothing at all showed up except the normal page (no change). I then tried saving the index.html as index.php and it had a headache.

And now I have a headache.... please dont read this thread lol cos you'd probabily get one too, only joking.

Thanks anyway...

Any other suggestions?
90awk is offline
Reply With Quote
View Public Profile
 
Old 01-25-2007, 04:32 PM Re: Including perl in a html page.
Novice Talker

Posts: 7
Name: Andrew
Trades: 0
Ok, no replies. Im now wandering if im asking the right questions?

Any help guys... please
90awk is offline
Reply With Quote
View Public Profile
 
Old 01-28-2007, 05:32 PM Re: Including perl in a html page.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by 90awk View Post
Ok, no replies. Im now wandering if im asking the right questions?

Any help guys... please
Maybe, You certainly are not giving us enough information.


Quote:
I then tried saving the index.html as index.php and it had a headache.
and this means ????


one thing to note is that you seem to be joining a link farm, maybe you should read up on SEO and link farms before you commit yourself.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-27-2007, 09:39 AM Re: Including perl in a html page.
pom
Novice Talker

Posts: 7
Name: Want to be Heidi
Trades: 0
Hi,

I don't think that Perl can be embeded within HTML. it needs something perlish.

If you want to execute perl, put perl path on the top of file.

Quote:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
Hope this helps,

Pom
pom is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Including perl in a html page.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54494 seconds with 12 queries