destination URL not accepting a valid URL

27 views
Skip to first unread message

peters...@gmail.com

unread,
Nov 7, 2005, 5:05:18 AM11/7/05
to AdWords API Forum
Hiya, I am having trouble setting my destination URL to the following
URL:

http://clkuk.tradedoubler.com/click?p=19622&a=1121816&g=1063207

When I pass this to the destination URL tag it does not correctly
create the ad.

$destinationUrl =
"<destinationUrl>http://clkuk.tradedoubler.com/click?p=19622&a=1121816&g=1063207</destinationUrl>";

All my code is working and I can pass other URLs such as
http://google.com which works fine but for some reason I am having
bother with the above URL.

If anyone has any idea why this does not work then please get in touch.

Thanks in advance for your time.

Best wishes,
Peter

Bartek Jakubski

unread,
Nov 7, 2005, 7:06:39 AM11/7/05
to AdWords API Forum
On Mon, Nov 07, 2005 at 10:05:18AM -0000, peters...@gmail.com wrote:
>
> Hiya, I am having trouble setting my destination URL to the following
> URL:
>
> http://clkuk.tradedoubler.com/click?p=19622&a=1121816&g=1063207
>
> When I pass this to the destination URL tag it does not correctly
> create the ad.
>
> $destinationUrl =
> "<destinationUrl>http://clkuk.tradedoubler.com/click?p=19622&a=1121816&g=1063207</destinationUrl>";
>
> All my code is working and I can pass other URLs such as
> http://google.com which works fine but for some reason I am having
> bother with the above URL.

It seems that you are manually constructing your XML - in the example
above you have unescaped '&' characters - do the get substituted by
entities later? If not maybe this is your problem? Do your other working
URLs also contain this character?


--
-- .- Bartek Jakubski ------- JabberID: mi...@histeria.pl -. --
-- | Free Software is a matter of liberty, not price | --
-- `-----------------(http://www.fsf.org/philosophy)------' --

peter_stranney

unread,
Nov 7, 2005, 9:03:24 AM11/7/05
to AdWords API Forum
Thanks Bartek, you are right, the '&' symbol is causing the problem :)
I have tried but I am not quite sure how to tell php that it is not a
special character, should I do this when I am assigning the url to the
variable $tempurl and are there any php functions that will do this
automatically? I was looking at the php preg_quote function but I don't
this that is the correct one, it will only cater for the regular
expression characters.

Thanks again for your help,
Peter

Craig Webster

unread,
Nov 7, 2005, 9:13:50 AM11/7/05
to peter_stranney, AdWords API Forum

On 7 Nov 2005, at 14:03, peter_stranney wrote:
> I have tried but I am not quite sure how to tell php that it is not a
> special character, should I do this when I am assigning the url to the
> variable $tempurl and are there any php functions that will do this
> automatically?

http://php.net/htmlentities

Yours,
Craig
--
Craig Webster | t: +44 (0)131 516 8595 | e: cr...@xeriom.net
Xeriom.NET | f: +44 (0)709 287 1902 | w: http://xeriom.net


peter_stranney

unread,
Nov 7, 2005, 9:37:49 AM11/7/05
to AdWords API Forum
> http://php.net/htmlentities

Thanks Craig, that was exactly what I was looking for. I got it sorted
and it's now working perfectly.

Best wishes,
Peter

Reply all
Reply to author
Forward
0 new messages