HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
build links in tables from cell content
Post new topic   Reply to topic    HTML Help Forum -> DHTML
View previous topic :: View next topic  
Author Message
dcwaits



Joined: 05 Aug 2009
Posts: 3

PostPosted: Wed Aug 05, 2009 8:11 am     build links in tables from cell content Reply with quote

I use an outside service to display product data sheets on our intranet.
The links are constructed as :

http://outsideservice.com:8080/poster.htm?username=username&password=PASSWORD&upc=68785576060

where the UPC code (last 11 characters) are the only changing value from one product to the next. Building a table with appropriate links was no problem.

The problem:
Now I want to be able to use the service on my public web site. Since the makeup of the link would expose my username and password to the public and to search engines, I need to hide the actual href="" from the visitors.

How could I enter the first part of the link automatically without exposing it to the user when someone clicks on the table cell containing the UPC code.
kanenas



Joined: 14 Dec 2004
Posts: 341

PostPosted: Sun Aug 09, 2009 11:10 am     Use your server as a proxy. Reply with quote

You can't securely link directly to the outside service no matter how well hidden you make your credentials, as you'll still need to give them to the visitor's browser. What you can do instead is use your server as a proxy. Write a simple server side script that takes a UPC code, requests the corresponding page from the external server and returns the result to the visitor.
dcwaits



Joined: 05 Aug 2009
Posts: 3

PostPosted: Wed Aug 12, 2009 8:53 am     Easy for you to say. Reply with quote

I am pretty green with html and scripts. The I item I retrieve from the service is ALWAYS a .PDF file. Could you help me write a cgi script to do this?

The service always hides the URL with a redirect so all the end user gets is the http://outsideservice.com:8080/index.jsp in the address bar, once the page loads. I would be ok with my server downloading the file and renaming it, and make the renamed file available from my server.
kanenas



Joined: 14 Dec 2004
Posts: 341

PostPosted: Sat Aug 15, 2009 4:23 pm     I can help a little. Reply with quote

What languages and frameworks are available on your server? Do you need to authenticate visitors, or do you want to give everyone access to the PDFs? What's the URI for a sample page on the site that needs to link to a PDF?
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> DHTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial