cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Help with aspx

From: Daniel Blixt <danielblixt_at_yahoo.se>
Date: Sun, 4 Feb 2007 23:16:30 +0100 (CET)

Hello!

I'm trying to post to two different aspx sites but i can't get it to work.

Could someone please take a look at my two scripts and show me how to do it right. Please!!

With Best Regards
Daniel

SCRIPT1
---------------------
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_URL, 'http://www.apfastigheter.se/Templates/PropertyObjectList.aspx?id=199&search=true');
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
'Defaultframework1:_ctl13:PropertyObjectSearchBarUC:CityAndQuartersList' => '72f8d2cd-85fc-4f66-8ac8-d2e096175393',
'Defaultframework1:_ctl13:PropertyObjectSearchBarUC:SizeList' => '0-2147483647',
'Defaultframework1:_ctl13:PropertyObjectSearchBarUC:ObjectsPerPageList' => '30'
));

$content = curl_exec($ch);
curl_close($ch);

print($content);
?>

SCRIPT2
-----------------------
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_URL, 'http://www.fabege.se/templates/Objectsearch.aspx');
curl_setopt($ch, CURLOPT_POSTFIELDS, array(
'epslanguage' => 'SV',
'id' => '106'
));

$content = curl_exec($ch);
curl_close($ch);

print($content);
?>

                 
---------------------------------

Stava rätt! Stava lätt! Yahoo! Mails stavkontroll tar hand om tryckfelen och mycket mer! Få den på http://se.mail.yahoo.com

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-02-04