AdWords
3.6K members online now
3.6K members online now
Improve your AdWords performance and boost your ROI, CTR, and Quality Score
Guide Me
star_border
Reply

i using v201302 adwords php api and im tryimg the Imagead

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

this is the error

ImageError.INVALID_IMAGE @ operations[0].operand.ad.image.data

 

this is my code - (im on sandbox !! )

 

        $img_src=$baseurl_cut."uploads/aaa.png";
        $img_size = filesize($img_src);
        #$imgbinary = fread(fopen($img_src, "r"), filesize($img_src));
        $imgbinary = file_get_contents($img_src);
        $img_str = base64_encode($imgbinary);
        
        echo "------------------------------------------<br>";
        echo '<img src="data&colon;image/jpg;base64,'.$img_str.'" />';
        echo "------------------------------------------<br>";
                
    $textAd = new ImageAd();
    $textAd->name = "idan";
    $textAd->url = $array['ad_txt_url'];
    $textAd->displayUrl = $array['ad_txt_displayUrl'];
    $textAd->image->data=$img_str;

 

1 Expert replyverified_user

Re: i using v201302 adwords php api and im tryimg the Imagead

Community Manager
# 2
Community Manager
Hi there,

Users in this Community might not be able to help as much with API issues, but you might want to check in with the AdWords API Community here: https://developers.google.com/adwords/api/community/

Re: i using v201302 adwords php api and im tryimg the Imagead

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
any luck with this situation as I am facing same issue . would appreciate your help

Re: i using v201302 adwords php api and im tryimg the Imagead

Community Manager
# 4
Community Manager
This 2013 thread has been closed to new replies.