1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| <?php
$lien = 'http://www2.leboncoin.fr/ai?ca=12_s';
$postfields = array(
'check_type_diff' => '0',
'region' => '17',
'dpt_code' => '59',
'zipcode' => '59100',
'category' => '15',
'company_ad' => '0',
'type' => 's',
'name' => 'cloclo',
'email' => 'cloclo@gmail.com',
'phone' => '06XXXXXX',
'no_salesmen' => '1',
'subject' => 'Ordi Portable HP',
'clothing_type' => '0',
'clothing_st' => '0',
'shoe_type' => '0',
'shoe_size' => '0',
'jobcontract' => '0',
'jobstudy' => '0',
'jobfield' => '0',
'jobduty' => '0',
'jobtime' => '1',
'gearbox' => '0',
'animal_type' => '0',
'animal_race' => '0',
'animal_age' => '0',
'body' => 'Ecran 17pouce Processeur Double Coeur 2,4GHZ Trés Bonne état Installation récente de windows',
'price' => '150',
'validate' => 'Valider',
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $lien);
curl_setopt($curl, CURLOPT_COOKIESESSION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postfields);
#$return = curl_exec($curl);
curl_close($curl);
?> |
Partager