SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jul 2008
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Curl Call Not Working

    Hi everybody,
    I have got my URL and Post data using Live Http Headers on Firefox, but yet when I run this code, I am getting a HTML Not Found message. Any ideas?

    PHP Code:
    $url 'http://79.125.108.119/quote/car-insurance.mvc/FullQuote?BrokerCode=CHILL';
    $curl_handle=curl_init();
    curl_setopt($curl_handleCURLOPT_USERAGENT"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); 
    $data 'carAreaKeptOvernight=12&sexId=2&driverAge=40&PhoneNumber=999&Email=999%40999.com&driverNCDYears=8&carManufacturer=1167&carModel=3192&carRegYear=2010&carEngSize=16&carList=59688&carAreaKeptOvernightIsTown=&carValue=10000&covertypeId=1&policystartdate=14%2F09%2F2011&voluntaryexcess=1&classofuse=5&carisimport=false&lefthanddrive=false&purchased=2010&registration_year=10&registration_county=D&registration_number=3434&keptovernight_county=12&keptovernight_town=9550&mainuse_county=12&mainuse_town=9550&securitydevice=4&annualmileage=10000&parkedovernight=2&parkedovernight_other=&travelpass=false&travelpassnumber=&travelpassprovider=&spouseorpartnerflltimeuseofothercar=false&advdrivingcourse=false&advdrivingcourse_course=&advdrivingcourse_date=&ncdcountry=104&ncdexpirydate=13%2F09%2F2011&currentinsurer=2&currentpolicynumber=2342&insuredsomeoneelsepolicy=false&otherpolicy_exptype=&otherpolicy_relationship2policyholder=&otherpolicy_howmanyyears=&otherpolicy_expirydate=14%2F09%2F2011&otherdrivers=11&title=5&firstname=John&surname=John&dob_day=10&dob_month=2&dob_year=1972&addrline1=Dublin&addrline2=&addrline3=&addrcounty=12&phonenumber=999&email=999%40999.com&maritalstatus=5&occupation=3&employersbusiness=2&employmentstatus=16&licencenumber=34234&licencetype=3&licencecountry=104&licenceyearsheld=9&policyholder_penaltypoints=0&policyholder_penaltypoints_offences=&txtPromotionCode=&ddlHearAboutUs=3&ddlHearAboutUs_other=&cbkSpecialOffer=true&cbkAgreeTerms=true';
    curl_setopt($curl_handleCURLOPT_POST,1);
    curl_setopt($curl_handleCURLOPT_POSTFIELDS ,$data);
    curl_setopt($curl_handle,CURLOPT_URL,$url);
    curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
    curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
    $buffer curl_exec($curl_handle);
    curl_close($curl_handle);
    echo 
    $buffer

  2. #2
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,285
    Mentioned
    181 Post(s)
    Tagged
    4 Thread(s)
    Well, when I point a browser to 'http://79.125.108.119/quote/car-insurance.mvc/FullQuote?BrokerCode=CHILL' I get an error.
    That needs to be resolved first.
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •