Je souhaite telecharger les resultas d'un screeneur d'actions present sur cette page pour le pays FRANCE:

https://www.investing.com/stock-scre...q_market_cap;1

pour cela, je souhaite utiliser php curl pour envoyer des variables au screeneur ( avec la methode Get)

voici le code (incorrect car je n'arrive pas à envoyer les variables)
on arrive bien à la page du screeneur par contre le pays France n'est pas selectionné dans le menu deroulant

merci d'avance pour votre aide

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
	$url = "https://investing.com/stock-screener/";
	$parameters = "sp=country::22|sector::a|industry::a|equityType::a|exchange::9>eq_market_cap;1";
 
	$cookie = tmpfile();
	$userAgent = 'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.31' ;
	$ch = curl_init("$url?$parameters");
	$options = array(
	CURLOPT_CONNECTTIMEOUT => 10 , 
	CURLOPT_USERAGENT => $userAgent,
	CURLOPT_AUTOREFERER => true,
	CURLOPT_FOLLOWLOCATION => true,
	CURLOPT_RETURNTRANSFER => true,
	CURLOPT_COOKIEFILE => $cookie,
	CURLOPT_COOKIEJAR => $cookie ,
	CURLOPT_SSL_VERIFYPEER => 0 ,
	CURLOPT_SSL_VERIFYHOST => 0);
	curl_setopt_array($ch, $options);
	$result = curl_exec($ch);
	curl_close($ch);
 
	print($result);