Php url rewriter

Discussion in 'PHP' started by oneto018, Dec 14, 2009.

  1. #1
    I need a script which can encode and decode the url while browsing as in php proxy and glype proxy. The script just need to encode the url , no need to proxyfy anything. Is there any such script or else how to write it. I am really new to php. I think it can be done with php.
     
    Last edited: Dec 14, 2009
    oneto018, Dec 14, 2009 IP
  2. tenev

    tenev Active Member

    Messages:
    322
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    95
    #2
    
    //this might work
    $url='http://blabla.com';
    $encoded = base64_encode($url);
    //page to decode will use this
    $url = base64_decode($encoded);
    
    PHP:
    nice ? but note everyone will be able to decode it :)
    i didn't get what u mean by 'while browsing' you want to hide the url? this is impossible. you must own the domain name :))
     
    tenev, Dec 14, 2009 IP
  3. xenon2010

    xenon2010 Peon

    Messages:
    237
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    to encode a URL follow this example:
    $url = 'http://example.com/index.php?data= how to use this sample :)';
    $encoded = urlencode($url);
    echo $encided;

    to decode a URL follow this example:
    $decoded = urldecode($encoded);
    echo $decoded;
     
    xenon2010, Dec 14, 2009 IP
  4. oneto018

    oneto018 Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    Actually I needed a script to use as proxy which will just encode url. Becoz in my institution many keywords get blocked
     
    oneto018, Dec 14, 2009 IP
  5. taminder

    taminder Peon

    Messages:
    581
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    http://sourceforge.net/projects/poxy/
    Code (markup):
    it has a feature to encode the URL.
     
    taminder, Dec 15, 2009 IP
  6. oneto018

    oneto018 Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #6
    But I don't want a proxy script. I don't want that script to access from a proxy server. I don't want that script to proxify the pages. Any idea guys
     
    oneto018, Dec 16, 2009 IP
  7. Wogan

    Wogan Peon

    Messages:
    81
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    0
    #7
    Wait, I'm confused. You want a script set up in such a way that, for instance, instead of seeing "http://google.com" in your browser, you see "http://some.com?non=sense"?

    That's a proxy script. That's the only way you'll get this right in PHP. The only other way to do it is to rewrite hostnames in your router, or some other insane (and pointless) "solution" like that.

    Why do you even need this? Are you trying to hide your browsing activity? You realize that network monitors look at IPs, not URLs, and it's impossible to "proxify" IPs without using, you know, A PROXY?
     
    Wogan, Dec 16, 2009 IP
  8. oneto018

    oneto018 Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #8
    I know that. Network monitors look at ips . Not url. But in my institution, a stupid software blocking showing access denied page, if the url contains terms such as 'video' , 'chat','myspace',...
    I know this is to prevent of abuse of internet connection. But that software blindly blocks every url containing those terms.
    Ok! I am explaining my need clearly. What do these proxy scripts do? Its grabbing everything from the page of given url and reconstuct it with its level best and delivers the content to user from some other server where the script is hosted(This is what I have understood from my knowledge and experience). I don't want this to happen. I have many proxy sites created by me that have scripts such as glype proxy, zelune, phproxy , cgi proxy . But what the problem with these proxies is , that we can't sign in many sites.
    I need a script which just do the encoding and decoding job as these scripts do, but at the same time the content should be delivered from actual server . Not the proxy server. I know am searching a question which may not exist. I want to know , is it possible what I need.
     
    oneto018, Dec 17, 2009 IP
  9. DanAbbamont

    DanAbbamont Guest

    Messages:
    330
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #9
    So you really want the content of the page to be transmitted to the browser encrypted so none of those keywords at all come up, not just the URL but the actual HTML content?

    What if you sent back a line of javascript do document.write() your base64 encoded HTML content?
     
    DanAbbamont, Dec 17, 2009 IP
  10. cheap_seo

    cheap_seo Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    oneto018,

    really a good think i like it it will help all students who are facing this problem regarding the url blocking... please issue publicly so every one get aware this .. and they enjoy the net... without any barrier of the blocking Url's.....

    thanks i will wait for u'r answer.....
     
    cheap_seo, Dec 18, 2009 IP
  11. ghprod

    ghprod Active Member

    Messages:
    1,010
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #11
    how if u use iframe to cloak the url??

    is still blocking by your network?

    regards
     
    ghprod, Dec 18, 2009 IP
  12. oneto018

    oneto018 Member

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    I was really too ignorant to post the question above few years ago. Now I can understand the 4 layered tcp/ip network and my need can be fulfilled only by using a sperate proxy server or hack server providing network. Anyway, thanks for sincere enought to reply this stupid question.
     
    oneto018, Sep 3, 2012 IP