Forum Moderators: mack

Message Too Old, No Replies

Webpage that returns modified value

         

GhostPig

6:35 pm on Feb 20, 2005 (gmt 0)

10+ Year Member




I wasn't really sure where to post this, as I'm not sure what technology it would use (if there is such a thing that is available)

Anyhow, my question is this - I need to develop a webpage that will generate a link from the data that the user enters - for instance, when linking to Play.com I have the option to 'deep link' the item, and gain revenue for my site from it - so say the user enters a URL, and then presses the appropriate button - I need the output to be the 'deep linked' version of the items URL.

Sorry if it's not very clear, I basically need to know where to start (any further guidance is appreciated!) in order to have an webpage that accepts one value, and then modifies if and displays the value to the user

Many Thanks,

Ghost Pig

lZakl

1:40 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



Your post is almost incomprehensible, but I THINK I may know what you are trying to do... Say I go to your site, and there is a text field that says:

"enter URL"

I type in: "www.example.com"

and hit enter. You want your site to take this info, and modify it, to:

"www.example.com/deep/link/index.html"

and display the output to the end-user? Please clarify this for us Ghost! ;0)

-- Zak

GhostPig

6:33 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



YES!

That's it - sorry, I couldn't think of how to describe it...

lZakl

8:00 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



Now the next question is do you want this modified link to be displayed to all users? Or just that one user , that one time.

Beit case 1: I would create index.php. I would have the form submit to self, the PHP would modify, and write the link to a text file, or MySQL database, and include the text file or query results into the html. Then everyone who visits this page would see a list of modified links that surfers have been entering.

Beit case2: I would use Javascript to modify the input, and place it with innerhtml into an empty <TD> using a DIV in CSS. Then the surfer who inputed the link would see the modified link, the world would not. However unless you planted a cookie, the information that user enters will go away when they close their browser.

Hope this helps...

-- Zak

GhostPig

8:15 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



I think case 2 would do perfectly - the link doesn't need to be shown to numerous people or to stay in memory once it has been produced - so I shall begin my explorations down that route

Many thanks

lZakl

8:33 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



Good luck! If you need any help, I have a JS on file that does almost exactly what you're looking for, I will stickymail it to you if you want it. :0)

--- Zak

GhostPig

9:39 pm on Feb 21, 2005 (gmt 0)

10+ Year Member



A sticky mail of that file would be tremendous!

Thanks!