CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Regular Expressions:
modify links in html document for proxy

 



aman123
New User

Nov 15, 2008, 3:16 PM

Post #1 of 1 (3046 views)
modify links in html document for proxy Can't Post

Hello Guys,
This is my first post and I need some help here.
I am working on my thesis for which I have to create a proxy( I found some proxy codes online but... its too hard to modify accordingly).
So what really I am looking for is
I am creating my own proxy.
->Enter any URL
->then downloading page source using lynx in a file
->modify all href, images and other links to redirect through my proxy.

example-- if it is www.yahoo.com then i download the source code for yahoo in a file and modify the hrefs as
http://www.mypage.com/proxy.pl?
which will display same as www.yahoo.com.

Once I click any other link on that page then the url will be like
http://www.mypage.com/proxy.pl?http://www.yahoo.com/pageopened.html

For websites href is written in different ways like
href="/page.html"
href="../page.html"
href="http://url"
href=url
...
.
.
......
in so many different ways..
so how can I make sure that I can read every href and modify it???

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives