HTTP/URL Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cozofdeath

    HTTP/URL Question

    Is there a Filesystem or cURL function that will allow me to request a
    url and send a specific string in the message or body of the request?

    Also is there a way to display the web page once its in a handle?

    Thanks for any answers!

  • rahul sinha

    #2
    Re: HTTP/URL Question

    On May 18, 6:02 am, cozofdeath <m...@hotmail.c omwrote:
    Is there a Filesystem or cURL function that will allow me to request a
    url and send a specific string in the message or body of the request?
    >
    Also is there a way to display the web page once its in a handle?
    >
    Thanks for any answers!

    Hi,
    I have made this code and have tried it its running fine and I think
    this will resolve your query..

    <?php

    $ch = curl_init("http ://www.zimaudio.co m/");
    $fp = fopen("curl/example_homepag e.txt", "w");

    curl_setopt($ch , CURLOPT_FILE, $fp);
    curl_setopt($ch , CURLOPT_HEADER, 0);

    curl_exec($ch);
    curl_close($ch) ;
    fclose($fp);

    $source = "curl/example_homepag e.txt";
    $html = file($source);
    for( $i=0; $i<count($html) ; $i++ )
    {
    print $html[$i];
    }
    ?>

    Thanks,
    Rahul S

    Comment

    Working...