22, November 2008

encoding url for blinklist - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: encoding url for blinklist
« previous next »
Pages: [1] Print

Author Topic: encoding url for blinklist  (Read 508 times)
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« on: Apr 25, 2006, 01:38:20 AM »

Hello,

I added the some buttons to my site to make it possible to add a link to sites like blinklist, example:
http://www.finalwebsites.com/snippets.php?id=32 Visit through proxy

because the links must be dynamic I have this code for the blink list button:
Code:
<a href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;Description=
<?php echo urlencode(htmlentities($row_selected['short_descr'], ENT_QUOTES)); ?>
&amp;Url=<?php echo "http://www.finalwebsites.com/snippets.php?id=".$row_selected['id']; ?>
&amp;Title=<?php echo urlencode($opti_alt_txt); ?>" target="_blank">
<img src="images/Blink_Small_Button.gif" alt="Blink it! <?php echo $opti_alt_txt?>" width="80" height="18" /></a>
this code is w3 valid and works partly at blink list except the name field looks like this:
DB_cart Class %28shopping cart%29

I played already with lots of encoding functions, what next?


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #1 on: Apr 25, 2006, 11:18:30 AM »

Maybe write your own Smiley

Something like :

Code:
<?php
myUrlencode 
$txt )
{
 return 
str_replace '%28''('str_replace'%29'')'urlencode$txt ) ) );
}

?>


I think this would work.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Apr 25, 2006, 11:37:26 AM »

hmm...
of course this is possible but what about other characters (like € and others), is there a way to convert a € to &euro; ?
(with a function not with replace)


Last blog : Just a better Internet portal provided by Google
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 8250
42487 credits
Members referred : 3



« Reply #3 on: Apr 25, 2006, 12:03:00 PM »

I am afraid that there is no function for this except if something like utf8encode can do that (I am not too familliar with those functions).

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy or twitter Visit through proxy

Last blog : Free Unlimited Bandwith and disk space to good to be true?
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Apr 25, 2006, 12:58:04 PM »

Its' strange that this happens only for blinklist, the other furl, del.icio are working wel...


Last blog : Just a better Internet portal provided by Google
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Apr 25, 2006, 12:58:53 PM »

but you gave me an idea (utf-8)... thanks


Last blog : Just a better Internet portal provided by Google
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6441
39470 credits
Members referred : 374


It's time to use PHP5!


« Reply #6 on: Apr 25, 2006, 11:19:09 PM »

I tried a little bit more, also the javascript link provided by blinklist. All with the same result the brackets are changed into "%28 %29"

look like to be a bug or maybe I have to encode my own site into utf-8... :-(

by the way utf8_encode is a good and often used function but in this case it will not work...


Last blog : Just a better Internet portal provided by Google
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=2355
Tags : javascript furl Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: encoding url for blinklist
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Nov 22, 2008, 11:29:34 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 37.741
Total Topics: 7.651
Total Members: 4.398
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: egseopro

28 Guests, 3 Users online :

11 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.