Foro de Snoopy Trankos Virtual Studio Seguridad

ProgramaciĆ³n - Coding => Otros temas - Other questions => Mensaje iniciado por: butchs en 05 - Marzo - 2010, 03:38:44



Título: function "fetch_web_data" or "fsockopen"
Publicado por: butchs en 05 - Marzo - 2010, 03:38:44
Maybe you can help me.  I want to replace "stream_context_create" & "file_get_contents" with either the smf function "fetch_web_data" or "fsockopen"?  Can you provide your opinion?

Código:
$url = "http://detectfree.moviladetection.com/";
        $options = array("http" => array("method" => "GET", "header" => $headers));
        $context = stream_context_create($options);
        $contents = @file_get_contents($url, FALSE, $context);
???  :o


Título: Re: function "fetch_web_data" or "fsockopen"
Publicado por: Snoopy en 05 - Marzo - 2010, 04:06:31
Citar
I want to replace "stream_context_create" & "file_get_contents" with either the smf function "fetch_web_data" or "fsockopen"

M-DVD and me are using the function fetch_web_data() inside the mod Stop Spammer, but I know it doesn't work on all servers, so I wanted myself to look for a more general option to use in that mod.

Anyway that's another thing in my list of "Things To Do One Of These Days Whenever I Have Time".

That list is really growing very very long.


Título: Re: function "fetch_web_data" or "fsockopen"
Publicado por: Snoopy en 05 - Marzo - 2010, 04:24:10
Anyway, the expert in that area is M-DVD, not me.

He was already using that function when I started working on the mod.


Título: Re: function "fetch_web_data" or "fsockopen"
Publicado por: butchs en 05 - Marzo - 2010, 10:28:17
Thanks.

I think I figured it out.
 ;)