[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 02-27-2007, 02:25 PM   #1 (permalink)
Account Closed
 
fandie's Avatar
 
Join Date: May 2004
Location: uk
Posts: 1,773
11.75 NP$ (Donate)

fandie is just really nicefandie is just really nicefandie is just really nicefandie is just really nice


Help to encrypt url

Hi

Has anyone any code that will hex your url in the browser

I have given an example below

http://%77%77%77%2e%6e%61%6d%65%70%72%6f%73%2e%63%6f%6d

Diverts to namepros

I am looking for some kind of code or program that i install on my hosting that will keep my url encrypted

I will also pay someone to do this for me also

Thanks

:-)
fandie is offline  
Old 02-27-2007, 03:50 PM   #2 (permalink)
 
BillyConnite's Avatar
 
Join Date: Jul 2005
Location: Coffs H, Australia
Posts: 3,107
47.00 NP$ (Donate)

BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future

Wildlife Parkinson's Disease Parkinson's Disease
Not quite sure what you mean when you say, keep your URL encrypted... Do you mean keep the URL in hex format while someone is browsing, so they cannot see your domain easily?
PHP Code:
<?php
$printme
=bin2hex("www.namepros.com");
echo
$printme;
?>
That will convert a text string (or url) to hex, although, i'm not sure of the best way to go about inserting the %'s required for the link to work lol
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline  
Old 02-28-2007, 03:05 AM   #3 (permalink)
Account Closed
 
fandie's Avatar
 
Join Date: May 2004
Location: uk
Posts: 1,773
11.75 NP$ (Donate)

fandie is just really nicefandie is just really nicefandie is just really nicefandie is just really nice


Thanks i will try that out, what happens is is i want the true url of the wesbsite hidden and coded in the ie browser, if this is possibel
fandie is offline  
Old 02-28-2007, 03:27 AM   #4 (permalink)
NamePros Regular
 
Jim_'s Avatar
 
Join Date: Aug 2005
Posts: 585
285.40 NP$ (Donate)

Jim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to allJim_ is a name known to all

Save The Children
PHP Code:
<?php
$str
= "String to encode";
$new = "";
for(
$i = 0; $i < strlen($str); $i++)
  
$new .= "%".bin2hex(substr($str,$i,1));
echo
$new;
?>
Haven't tested, but should work.
__________________
ask me about the internet
Jim_ is offline  
Old 02-28-2007, 06:25 AM   #5 (permalink)
Stud Sausage
 
Join Date: Dec 2006
Location: England
Posts: 1,546
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of

Adoption Breast Cancer Breast Cancer Cancer Survivorship
Quote:
Originally Posted by Jim_
PHP Code:
<?php
$str
= "String to encode";
$new = "";
for(
$i = 0; $i < strlen($str); $i++)
  
$new .= "%".bin2hex(substr($str,$i,1));
echo
$new;
?>
Haven't tested, but should work.
You don't need to use substr to get the charactor, you can just use the string as an array:

PHP Code:
<?php
$url
= 'www.google.com';

for(
$i = 0; $i < strlen($url); $i++)
{
    
$new .= '%' . bin2hex($url[$i]);
}

echo
'http://' . $new;
?>
Matt
__________________
My NamePros Tools
(firefox plugin, google gadget etc)
Matthew. is offline  
Old 02-28-2007, 03:04 PM   #6 (permalink)
Account Closed
 
fandie's Avatar
 
Join Date: May 2004
Location: uk
Posts: 1,773
11.75 NP$ (Donate)

fandie is just really nicefandie is just really nicefandie is just really nicefandie is just really nice


Matt

I dont suppose you have demo of this working

Also is it possible to make the url change each time a new vistor goes to the site

I cant seem to get to work my end


:-)

Last edited by kerr; 02-28-2007 at 03:28 PM.
fandie is offline  
Old 03-01-2007, 11:58 AM   #7 (permalink)
Stud Sausage
 
Join Date: Dec 2006
Location: England
Posts: 1,546
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of

Adoption Breast Cancer Breast Cancer Cancer Survivorship
Demo:
http://mattjewell.com/test.php

Code:
PHP Code:
<?php

if(strlen($_POST['submit']) > 0)
{
    echo
'http://';
    
    for(
$i  = 0; $i < strlen($_POST['url']); $i++)
    {
        echo
'%' . bin2hex($_POST['url'][$i]);
    }
}
else
{
    
?>
    
    <form action="<?=$_SERVER['HTTP_SELF']?>" method="post">
    http://<input type="text" name="url" value="" /><br />
    <input type="submit" name="submit" value="submit" />
    </form>
    
    <?php
}
?>
Matt
__________________
My NamePros Tools
(firefox plugin, google gadget etc)

Last edited by Matthew.; 03-01-2007 at 12:08 PM.
Matthew. is offline  
Old 03-01-2007, 01:09 PM   #8 (permalink)
Barru.
 
Barrucadu's Avatar
 
Join Date: Aug 2005
Location: East Yorkshire, England
Posts: 2,731
78.50 NP$ (Donate)

Barrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to beholdBarrucadu is a splendid one to behold


I think kerr means keep the hex in the browser's navigation bar, NOT replace it with the actual url when the site is loaded.
Barrucadu is offline  
Old 03-01-2007, 01:12 PM   #9 (permalink)
Stud Sausage
 
Join Date: Dec 2006
Location: England
Posts: 1,546
34.41 NP$ (Donate)

Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of

Adoption Breast Cancer Breast Cancer Cancer Survivorship
Quote:
Originally Posted by Mikor
I think kerr means keep the hex in the browser's navigation bar, NOT replace it with the actual url when the site is loaded.
Yeah he PM'd me about this, it can't be done using this method.

Matt
__________________
My NamePros Tools
(firefox plugin, google gadget etc)
Matthew. is offline  
Old 03-01-2007, 03:46 PM   #10 (permalink)
Account Closed
 
fandie's Avatar
 
Join Date: May 2004
Location: uk
Posts: 1,773
11.75 NP$ (Donate)

fandie is just really nicefandie is just really nicefandie is just really nicefandie is just really nice


Thanks Matt for trying :-)

Trying to keep the hex in the browser. I have seem some sites with it

Anyone else have any ideas
fandie is offline  
Old 03-04-2007, 10:03 PM   #11 (permalink)
 
BillyConnite's Avatar
 
Join Date: Jul 2005
Location: Coffs H, Australia
Posts: 3,107
47.00 NP$ (Donate)

BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future

Wildlife Parkinson's Disease Parkinson's Disease
Kerr,
I see what you are wanting to do now, however this is a browser thing. Depending on the browser, usually they will check the URL to see if its hex or not, if it is, it will automatically convert it to the normal URL you can see.

As far as I know, you can't change this on the server's end, it's a client thing.
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 06:58 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85