Hy...
(Have I mentioned I'm a newbie?)

When I uploaded my snipped to a web hosting (should have thought of
that in first place!), I was unable to reproduce the error...

Sorry for wasting your time Jemery.
In my defense, the error did start on the webhost...
I'll came back when/if I have a working code (i.e., a code that
reproduces the error!)

And thanks for your help.


On Oct 21, 12:29 pm, Kromitvs <[EMAIL PROTECTED]> wrote:
> Hello Jeremy!
> (You're always around, han?! Nice!!! :-)
>
> You won't be able to see anything besides my own (non-english) error
> message in my site. If you prefer, I can posted anyway!
>
> I removed the http refer for testing purpose only, but if you run the
> code, you'll notice that some expressions bring out the error and some
> don't (there is foreach loop that tests 4 expression, 2 give an error
> and 2 don't).
> So, the problem is not (I think) the http refer...
>
> Or am I missing something?
>
> On Oct 21, 12:10 pm, Jeremy Geerdes <[EMAIL PROTECTED]> wrote:
>
> > I suspect your problem is that you're not defining a valid  
> > http_referer for your curl request.  You MUST supply this, even if the  
> > application is going to be completely desktop-based.  In the case of a  
> > server-side application, I would define it as the script that I was  
> > running.  In the case of a desktop or other standalone app, I would  
> > define it as my homepage or, probably better, a product homepage for  
> > the app that I was building.
>
> > Jeremy R. Geerdes
> > Effective website design & development
> > Des Moines, IA
>
> > For more information or a project quote:http://jgeerdes.home.mchsi.com
> > [EMAIL PROTECTED]
>
> > Unless otherwise noted, any price quotes contained within this  
> > communication are given in US dollars.
>
> > If you're in the Des Moines, IA, area, check out Debra Heights  
> > Wesleyan Church!
>
> > On Oct 21, 2008, at 6:06 AM, Kromitvs wrote:
>
> > > This is a PHP question...
> > > Should've mentioned it on the original title
>
> > > On Oct 21, 12:02 pm, Kromitvs <[EMAIL PROTECTED]> wrote:
> > >> Hy,
> > >> I came across an error on my application. Here is a snippet of code.
> > >> You will notice I list in the begging several expressions witch also
> > >> produce the same error, and others (similar to my eyes) which don't.
> > >> I've been using the general Search, and the Blog search. The error
> > >> seems to apear only on the Blog search!
>
> > >> I'm at a lost here!
> > >> Can someone help? Reproduced it? Tell me what I'm doing wrong? Fix  
> > >> it?
> > >> (congratulate me on finding my first BUG?)
>
> > >> Thanks!!!!!!!!!
>
> > >> CODE:
>
> > >> <?php
>
> > >> /*
> > >> Error
> > >> $teste[0] = 'aos%2Cma';
> > >> $teste[2] = '1os%2Cma';
> > >> $teste[5] = 'aos%2C3a';
> > >> $teste[6] = 'aos%2Ca3';
> > >> $teste[3] = 'aos%2Cmm';
> > >> $teste[4] = 'aos%2Caa';
> > >> $teste[6] = 'dfg%2Cma';
> > >> $teste[7] = 'sfd%2Cma';
> > >> $teste[8] = 'asd%2Cma';
> > >> $teste[6] = 'dfg%20ma';
> > >> $teste[8] = 'asd%21ma';
>
> > >> No error
> > >> $teste[1] = 'aos%2Cm';
> > >> $teste[2] = 'aos%2C';
> > >> $teste[3] = 'aos';
> > >> $teste[4] = 'ao';
> > >> $teste[5] = 'a';
> > >> $teste[6] = '123%2C23';
> > >> $teste[7] = 'qwe%2Cqw';
> > >> $teste[8] = 'ads%2Cfd';
> > >> $teste[9] = 'a%20s%2C%20a';
> > >> $teste[10] = 'a%22%22%2Cm%20';
> > >> $teste[11] = '%20os%2C%20a';
> > >> $teste[12] = 'a%20%20%2C%20a';
> > >> $teste[13] = 'a-s%2C--';
> > >> $teste[14] = 'aaa%2Caa';
> > >> $teste[15] = '222%2C22';
> > >> $teste[1] = 'ooo%2Cma';
> > >> $teste[2] = 'sss%2Cma';
> > >> */
>
> > >> $teste[0] = 'aos%2Caa';
> > >> $teste[6] = 'dfg%20ma';
> > >> $teste[7] = 'sfd%22ma';
> > >> $teste[11] = 'asd%2Dma';
>
> > >> foreach ($teste as $temp)
> > >> {
> > >> $QueryUrlBlogSearch = 'http://ajax.googleapis.com/ajax/services/search/
> > >> blogs?v=1.0&q=' . $temp;
> > >> print '<strong><br / ><br /> ' . $temp . '</strong>  : ';
>
> > >> //===Google Blog Search AJAX API
> > >> $ch2 = curl_init();
> > >> curl_setopt($ch2, CURLOPT_URL, $QueryUrlBlogSearch);
> > >> curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
> > >> curl_setopt($ch2, CURLOPT_REFERER, '');
> > >> $SearchResult2 = curl_exec($ch2);
> > >> curl_close($ch2);
> > >> $jsonBlog = json_decode($SearchResult2);
> > >> // now have some fun with the results... (ye... right!)
>
> > >> if ($jsonBlog->{'responseStatus'} != 200)
>
> > >> {
> > >> var_dump ($jsonBlog);
> > >> print '<br />$jsonBlog->{responseStatus} : ' . $jsonBlog-
>
> > >>> {'responseStatus'};
> > >> //die;
> > >> }
>
> > >> elseif (!count($jsonBlog->{'responseData'}->{'results'})) print '<div
> > >> style="color:blue">No result!! :-)</div>'  ;
>
> > >> else
> > >> {
> > >>  foreach ($jsonBlog->{'responseData'}->{'results'} as &$cc2)
> > >>         print   '<div style="color:green"> content ' . $cc2-
> > >> >{'content'} .
> > >> '</div>';
>
> > >> }
> > >> }//end outer foreach
>
> > >> ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" 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-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to