Web Analytics Made Easy -
StatCounter curl not working..url with parameter with commas... - CodingForum

Announcement

Collapse
No announcement yet.

curl not working..url with parameter with commas...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • curl not working..url with parameter with commas...

    Hi,

    i am fetching web page data using curl...and its working fine for



    But when i am trying to fetch url like

    /zip/30012/type-single-family-home,condo-townhome-row-home-co-op,mfd-mobile-home/pg-1#/

    it doesn't work... showing Bad Request (Invalid URL) and same URL worked with browser

    my code is

    PHP Code:
    function fetch_totalproperty($furl)
    {
        
    // Set up the CURL object
        
    $ch curl_init($furl);
        
        
    // Fake out the User Agent
        
    curl_setopt$chCURLOPT_USERAGENT"Internet Explorer" );
        
        
    // Start the output buffering
        
    ob_start();
        
        
    // Get the HTML from MetaCritic
        
    curl_exec$ch );
        
    curl_close$ch );
        
        
    // Get the contents of the output buffer
        
    $str ob_get_contents();
        
    ob_end_clean();    
        
        return 
    $str;    
    }

    //
    // A very simple example that gets a HTTP page.
    //

    $get_content fetch_totalproperty("http://www.domainname.com/zip/30012/type-single-family-home,condo-townhome-row-home-co-op,mfd-mobile-home/pg-1#/");


    print_r($get_content); 
    i just hide domain name here......but for http://www.domainname.com/zip/30012 its working fine..

    can any one help me in this?

    Thanks,
    Jaymin
    Last edited by jayminkey; Sep 7, 2011, 11:42 PM.
Working...
X
😀
🥰
🤢
😎
😡
👍
👎