Help resolving this "URL file-access" problem

Help resolving this "URL file-access" problem

Posted by: pancho91
Posted on: 2008-06-22 09:13:00

Hi, i've got this code:

Re: Help resolving this "URL file-access" problem

Posted by: sdayman
Posted on: 2008-06-22 10:19:00

fopen is disabled for security reasons, but you can use cURL:

http://wiki.dreamhost.com/CURL

-Scott

Re: Help resolving this "URL file-access" problem

Posted by: pancho91
Posted on: 2008-06-22 11:39:00

the thing is that i dont know how to use it,...

i was looking for someone to help me !

bye ;)

Re: Help resolving this "URL file-access" problem

Posted by: sdayman
Posted on: 2008-06-22 15:21:00

Try:

$fp = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://".$dominio."/jm/searchXml?as_categ_id=".$id_categ."&as_word=".$buscar."&as_order_id=MAS_OFERTADOS&as_filtro_id=PRECIO_FIJO&as_display_type=G","r");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);


I'm not sure what the "r" does at the end of your URL, but experiment with the above code. Hopefully it'll get you close.

-Scott

Re: Help resolving this "URL file-access" problem

Posted by: pancho91
Posted on: 2008-06-22 15:57:00

i thank you a lot.. first for taking your time to read my post..

but, could you put the hole code with your correction?, as i dont know from which line should i delete and correct the script.

Bye ;)

Re: Help resolving this "URL file-access" problem

Posted by: sdayman
Posted on: 2008-06-22 16:29:00

Sorry, you should be replacing:

$fp = fopen("http://".$dominio."/jm/searchXml?as_categ_id=".$id_categ."&as_word=".$buscar."&as_order_id=MAS_OFERTADOS&as_filtro_id=PRECIO_FIJO&as_display_type=G","r")


It's near the bottom of your code. Keep the:

or die("Error reading data.");

-Scott

Re: Help resolving this "URL file-access" problem

Posted by: scjessey
Posted on: 2008-06-22 19:20:00

You should also be replacing all instances of $HTTP_GET_VARS with $_GET, since the former is deprecated.

-- si-blog --

Re: Help resolving this "URL file-access" problem

Posted by: pancho91
Posted on: 2008-06-25 07:21:00

I get:
when i visit:
http://www.riveresmundial.com.ar/es/shop/xml_listado.php?as_categ_id=1286&buscar=river&pais=MLA

Asi "river" is the word to search and "1286" teh category to search in on these script that loads PRODUCTS from www.mercadolibre.com.ar (its like Ebay)