List Info

Thread: how to use PHP AND PHPS?




how to use PHP AND PHPS?
user name
2007-11-05 07:17:04
i find they all return string....

<?php
  $url = '
http:/
/localhost:8080/solr/select/?q=solr&version=2.2&star
t=0&rows=10&indent=on&wt=php
';
  var_dump(file_get_contents($url);
?>


-- 
regards
jl
Re: how to use PHP AND PHPS?
user name
2007-11-05 07:56:02
I would imagine you have to unserialize

On 11/5/07, James liu <liuping.jamesgmail.com> wrote:
> i find they all return string....
>
> <?php
>   $url = '
> http:/
/localhost:8080/solr/select/?q=solr&version=2.2&star
t=0&rows=10&indent=on&wt=php
> ';
>   var_dump(file_get_contents($url);
> ?>
>
>
> --
> regards
> jl
>

Re: how to use PHP AND PHPS?
country flaguser name
United States
2007-11-05 08:02:03
On Nov 5, 2007, at 8:56 AM, Robert Young wrote:

> I would imagine you have to unserialize
>
> On 11/5/07, James liu <liuping.jamesgmail.com> wrote:
>> i find they all return string....
>>
>> <?php
>>   $url = '
>> http://localhost:
8080/solr/select/? 
>>
q=solr&version=2.2&start=0&rows=10&indent=on
&wt=php
>> ';
>>   var_dump(file_get_contents($url);
>> ?>
>>
>>
>> --
>> regards
>> jl
>>

Robert is correct.  We do:

		$serializedSolrResults =
SearchHelper::fetchResults($queryString);
		$solrResults = unserialize($serializedSolrResults);

Where fetchResults handles all the curl setup and just
returns the  
results of the request.

$solrResults then has nice arrays for accessing the results,
facets,  
etc.

It is a string you're getting back -- but it's just the
serialized  
representation.

dave


Re: how to use PHP AND PHPS?
user name
2007-11-05 08:03:37
i know it...but u try it,,u will find simlar question.

On 11/5/07, Robert Young <bubblenutgmail.com> wrote:
>
> I would imagine you have to unserialize
>
> On 11/5/07, James liu <liuping.jamesgmail.com> wrote:
> > i find they all return string....
> >
> > <?php
> >   $url = '
> >
> http:/
/localhost:8080/solr/select/?q=solr&version=2.2&star
t=0&rows=10&indent=on&wt=php
> > ';
> >   var_dump(file_get_contents($url);
> > ?>
> >
> >
> > --
> > regards
> > jl
> >
>



-- 
regards
jl
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )