The script might be dying because it might not know how to handle errors and crashes. If you send a request to Google Base API servers, you should get a response that tells you what didn't work. I am not familiar with the Zend client library, so I can't help you with the syntax.
But why don't you try to use the demo page. http://www.google.com/base/api/demo/html/demo.html Authenticate, obtain a multitoken, then select action Insert and build the XML for one of your items. Should be fairly easy, based on the "chocolate butter" sample. Don't forget to add the link as <*link* rel='alternate' type='text/html' href='....here goes the link...'/> What does the server return? Alex On Tue, May 5, 2009 at 2:39 AM, kushal khatri <[email protected]>wrote: > Tom, > Another piece of information that may help you. I tried debugging the code > again today and in the > following statement, > > $linkArray[] = $gdata->newLink($link,'alternate', 'text/html'); > > If i change the 'text/html' to 'text' or 'html' or just remove it, the > script does not die out and posts > the products but the products do not get linked to the web page ($link). > > Please let me know about this. I am waiting for your reply before i start > to think about something else. > So please inform me in any case. > > Thank you. > > On Mon, May 4, 2009 at 2:08 AM, kushal khatri <[email protected]>wrote: > >> Tom, >> Yes , the items have been disapproved. I checked them out in the inactive >> tab and the reason could be >> because i am not able to post the link attribute with the items. This is >> how i am posting my products : >> >> $image_link = " >> http://discounttires.com/images/images_products/tires/normal/".$photo; >> $link = " >> http://discounttires.com/product_detail.php?c=OTlkODJjMmZlZjdkZjMyMWRlMWIwZjJlNTNlMTZjMWE=&prodID= >> ".$prod_ID; >> >> $newEntry = $gdata->newItemEntry(); >> // Add title >> $newEntry->title = $gdata->newTitle(trim($title)); >> >> // Add some content >> $newEntry->content = $gdata->newContent($content); >> $newEntry->content->type = 'text'; >> // Define item type >> $newEntry->itemType = 'products'; >> $newEntry->itemType->type = 'text'; >> >> $linkArray = $newEntry->link; >> $linkArray[] = $gdata->newLink($link,'alternate', 'text/html'); >> $newEntry->link = $linkArray; >> >> // Add item-specific attributes >> $newEntry->addGbaseAttribute('brand', 'General Tires', 'text'); >> >> $newEntry->addGbaseAttribute('price', >> $price, >> 'floatUnit'); >> $newEntry->addGbaseAttribute('size', $size, 'text'); >> $newEntry->addGbaseAttribute('product_type', 'Tires', 'text'); >> $newEntry->addGbaseAttribute('image_link', $image_link, 'url'); >> //$newEntry->addGbaseAttribute('link', $link, 'url'); >> $newEntry->addGbaseAttribute('id', $prod_ID, 'text'); >> // Post the item >> >> $createdEntry = $gdata->insertGbaseItem($newEntry, $dryRun); >> >> This script works fine when i comment out the piece of code which is >> posting the link >> of the product (below) but it gets disapproved because i have not posted >> the link. >> >> $linkArray = $newEntry->link; >> $linkArray[] = $gdata->newLink($link,'alternate', 'text/html'); >> $newEntry->link = $linkArray; >> >> But as soon as i remove the comments from this code, the script posts the >> data. >> And it all worked well until last month. >> >> Hope you can help >> >> Thanks >> On Mon, May 4, 2009 at 12:33 AM, Tom Wilson < >> [email protected]> wrote: >> >>> Can you confirm they were disapproved ? These posted item should be in >>> the inactive tab on the account. >>> Can you provide an example of a items that fails and the information your >>> trying to submit? >>> >>> >>> On Mon, May 4, 2009 at 05:01, kushal khatri <[email protected]>wrote: >>> >>>> Tom, >>>> As soon as i click the Submit button, the page just goes blank and no >>>> record is submitted. >>>> The URL is : http://discounttires.com. <http://discounttires.com> >>>> >>>> And because the products are only being submitted without the "link" >>>> attribute, they were >>>> obviously disapproved. >>>> Is there any other way to post the link attribute with Zend PHP >>>> framework. >>>> >>>> Thanks for your replies. >>>> >>>> On Sun, May 3, 2009 at 7:06 AM, Tom Wilson < >>>> [email protected]> wrote: >>>> >>>>> >>>>> Dies out how ? Whats the website URL ? >>>>> >>>>> Check your account dashboard is there any errors there like >>>>> 'disapproved' ? >>>>> >>>>> On May 3, 10:34 am, Kushal <[email protected]> wrote: >>>>> > Tom, >>>>> > >>>>> > There are no error messages. The script just dies out as i click the >>>>> > Submit button and no >>>>> > record is posted. Without using the Link attribute it works >>>>> absolutely >>>>> > fine. >>>>> > >>>>> > On May 3, 1:57 am, Tom Wilson <[email protected]> >>>>> wrote: >>>>> > >>>>> > >>>>> > >>>>> > > What error messages are there ? >>>>> > >>>>> > > On May 3, 5:16 am, Kushal <[email protected]> wrote: >>>>> > >>>>> > > > Hello, >>>>> > >>>>> > > > I have been using PHP Zend framework Google Base API to post >>>>> products >>>>> > > > on my website for more than >>>>> > > > 6 months and it all worked fine until the script stopped working >>>>> when >>>>> > > > i tried to post the products this >>>>> > > > month. I found out where the problem is in the script. It is not >>>>> able >>>>> > > > to create a link for the products >>>>> > > > and hence does not post any product at all. >>>>> > > > I am using the following snippet for linking : >>>>> > >>>>> > > > $linkArray = $newEntry->link; >>>>> > > > $linkArray[] = $gdata->newLink($link,'alternate', 'text/html'); >>>>> > > > $newEntry->link = $linkArray; >>>>> > >>>>> > > > where $link has a valid link of the product details page. >>>>> > > > It used to work fine until now and suddenly it has stopped >>>>> working >>>>> > > > now. I have no idea why. >>>>> > > > Please help me guys. >>>>> > >>>>> > > > Thank you. >>>>> >>>>> >>>> >>>> >>>> >>> >>> >>> -- >>> Thanks, >>> >>> Tom Wilson >>> Web and Media Developer >>> >>> e: [email protected] >>> w: www.tomthedeveloper.com >>> >>> Google Talk - [email protected] >>> Windows Live Messenger - [email protected] >>> Skype Name - tomthedeveloper >>> >>> Google Base Tools - http://dev.tomthedeveloper.com/googlebase >>> Featured Project : >>> http://google-code-featured.blogspot.com/2008/02/google-base-competitor-analysis.html >>> >>> >>> >> > > > > -- Alex Dovlecel, Google Switzerland GmbH Company Identifikationsnummer: CH-020.4.028.116-1 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Base Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Base-data-API?hl=en -~----------~----~----~----~------~----~------~--~---
