CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 resolved---urldecode

Print topic Send  topic

Author Message
RoyBaird

Posts: 115
Posted: 02/22/2010, 7:08 AM

I have a imagelink. The link is built from session variables with some special keys and timestamp then hashed using MD5. The url also contains a timestamp. I need to get the + replaced with space and %3A replaced with :. I know there is a urldecode function in PHP, but I can't find the proper place to call it. I tried "before show", but that did not work. I use the after initialize to create the session variables needed for the link. I am really stuck on this one.

Any ideas will be greatly appreciated....

Thanks,

=================================================
Rosolved
=================================================
here is how:
$ImageLink1 = & new clsControl(ccsImageLink, "ImageLink1", "ImageLink1", ccsText, "", CCGetRequestParam("ImageLink1", ccsGet, NULL), $MainPage);
$ImageLink1->Parameters = urldecode(CCAddParam($ImageLink1->Parameters, "ck", CCGetSession("wdurl", NULL)));

The urldecode function will strip out any characters that are normally put into a url like %20 or + .

_________________
Roy
View profile  Send private message
datadoit
Posted: 02/22/2010, 9:39 AM

Roy post your code for the ImageLink.

My first thought is that perhaps CodeCharge is URL encoding when using
the SetLink() function (or CCToURL). Thus, it's encoding once again
your decoded string.

Recognize that I don't think you'd want spaces in your URL. Spaces in
the SetValue() for the link is okay.
RoyBaird

Posts: 115
Posted: 02/22/2010, 11:42 AM

I have to have a space in the timestamp between the date and time. I can't change that as it is linking to another site and that is part of the security. I need to find where I can make the change before it redirects.
_________________
Roy
View profile  Send private message
datadoit
Posted: 02/22/2010, 1:41 PM

The "spaces" that you send in the URL should be encoded to '%20'. You
can't have a real space in the URL.
RoyBaird

Posts: 115
Posted: 02/23/2010, 4:58 AM

actually you can. it is in one of the parameters being passed. The receiving program does not want the % or +.
_________________
Roy
View profile  Send private message
datadoit
Posted: 02/23/2010, 7:32 AM

Please read: http://www.w3.org/Addressing/URL/url-spec.txt
RoyBaird

Posts: 115
Posted: 02/23/2010, 7:48 AM

Listen Pal, why are you banging my chops on this. I have a vendor that wants the url passed with the parameters set a certain way. it is not my design. I was just asking for help in making it work the way I was told. If this was such a hard and fast rule, why is there a PHP function to do exactly what I need?

thanks, but back off.
_________________
Roy
View profile  Send private message
datadoit
Posted: 02/23/2010, 9:36 AM

Loosen your tie ... we're not curing cancer here. :)

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.