Closed GoogleCodeExporter closed 8 years ago
I tested this code on my local copy, and it made my 26 character URL into a 119
character one. It generated a huge string...
Original comment by feddemas...@gmail.com
on 3 Jun 2010 at 1:41
This was not to convert the URL to a code. It is the code to generate a random
code to use as the small URL. The existing
code goes sequential. Smallurl.com/1000,Smallurl.com/1001,Smallurl.com/1003 etc
this makes it /a631g /b8d5a etc etc
Original comment by itspa...@gmail.com
on 3 Jun 2010 at 2:34
I know. All I did was replace the original generate_code() function with yours.
I was
going to post an example now, but I can't seem to recreate the problem.
But I assure you that your code generated a string that was 119 chars long...
Original comment by feddemas...@gmail.com
on 3 Jun 2010 at 3:48
What number did u put into the function?
Original comment by itspa...@gmail.com
on 3 Jun 2010 at 4:22
Ah, I should've put some more time into it instead of copy pasting it... I
didn't
change it, causing the $lenght to be the same as the number of urls converted.
On my
local backup that's about 5 urls, while on my online version it is in the
hundreds.
So the lenght was set to 100+
Those night-shifts are getting to me :P Sorry, your code seems fine. Thanx.
Original comment by feddemas...@gmail.com
on 3 Jun 2010 at 4:41
ya i was replying from my iphone on a bumpy road.
but its ment for the code that you would generate and give to the user, and
store
this code and the matching long url.
this code makes it random, the length parameter determines the length of the
code. it
excludes certain characters that look the same. (ex: zero, L, one)
the reason i came across this is because the existing code would generate them
in
order, and i would rather it be more random so someone couldnt make an exact
backup
of my database
Original comment by itspa...@gmail.com
on 3 Jun 2010 at 10:57
Original comment by hcblahb...@gmail.com
on 3 Jul 2010 at 8:50
I think this should be made an (config) option for added 'security' of URLs, or
so that they can't be harvested/indexed.
Original comment by dcedr...@gmail.com
on 3 Jul 2010 at 5:47
We may add this as a new feature in phurl v3. However, in phurl v 2, we have
decided to leave it as it is.
Thank you for your suggestion.
Original comment by julfo%ju...@gtempaccount.com
on 7 Jul 2010 at 10:07
Original issue reported on code.google.com by
itspa...@gmail.com
on 12 May 2010 at 3:47