Vous n’avez pas le droit de modifier cette page, pour la raison suivante :
Texte libre:
De {} Aller à : [http://curlybraces.be/wiki/index.php/ERG::Code-2018-2#mw-head navigation], [http://curlybraces.be/wiki/index.php/ERG::Code-2018-2#p-search rechercher] == Projets == [http://curlybraces.be/wiki/Typoem_-_Quentin_Lamouroux Typoem - Quentin Lamouroux] [http://curlybraces.be/wiki/La_f%C3%A9tichisation_de_l%27Objet_-_Quentin_Lamouroux La fétichisation de l'Objet - Quentin Lamouroux] [http://curlybraces.be/wiki/Programme_-_Clara_Sambot programme - Clara Sambot] [http://curlybraces.be/wiki/.IMG .IMG] [http://curlybraces.be/wiki/TYPO3000_-_Nathan_Laurent TYPO3000 - Nathan Laurent] [http://curlybraces.be/wiki/Destroy_prog._zoeflts Destroy prog. zoeflts] [http://curlybraces.be/wiki/Campix_alice Campix_alice] [http://curlybraces.be/wiki/Oram_-_Simon_Bouvier oram - Simon Bouvier] [http://curlybraces.be/wiki/P(A)Rojet_-_Anthony_Pauwels p(A)Rojet - Anthony Pauwels] [http://curlybraces.be/wiki/Impression_Alternative_-_Anthony_Pauwels Impression Alternative - Anthony Pauwels] [http://curlybraces.be/wiki/Trame92_-_Hugo_Delpluque Trame92 - Hugo Delpluque] [http://curlybraces.be/wiki/Framing_-_Jean_Cardin Framing - Jean Cardin] [http://curlybraces.be/wiki/M%C3%A1quina_do_tempo_-_Sofia_Erzini Máquina do tempo - Sofia Erzini] [http://curlybraces.be/wiki/Test test] [http://curlybraces.be/wiki/Partition_Graphique_-_Jade_Rouanet Partition Graphique - Jade Rouanet] [http://curlybraces.be/wiki/Sous-titre_-_Hugo Sous-titre - Hugo] [http://curlybraces.be/wiki/index.php?title=Histoire_de_l%27%C3%A9cran_-_Fr%C3%A9d%C3%A9ric_Jaman&action=edit&redlink=1 Histoire de l'écran - Frédéric Jaman] == Scripts démos == === Un script php pour analyser un fichier json de conversations Messenger === <pre class="de1">function fixBadUnicodeForJson($str) { $str = preg_replace_callback( '/\\\\u00([0-9a-f]{2})\\\\u00([0-9a-f]{2})\\\\u00([0-9a-f]{2})\\\\u00([0-9a-f]{2})/', function($matches) { return chr(hexdec("$1")).chr(hexdec("$2")).chr(hexdec("$3")).chr(hexdec("$4")); }, $str ); $str = preg_replace_callback( '/\\\\u00([0-9a-f]{2})\\\\u00([0-9a-f]{2})\\\\u00([0-9a-f]{2})/', function($matches) { return chr(hexdec("$1")).chr(hexdec("$2")).chr(hexdec("$3")); }, $str ); $str = preg_replace_callback( '/\\\\u00([0-9a-f]{2})\\\\u00([0-9a-f]{2})/', function($matches) { return chr(hexdec("$1")).chr(hexdec("$2")); }, $str ); $str = preg_replace_callback( '/\\\\u00([0-9a-f]{2})/', function($matches) { return chr(hexdec("$1")); }, $str ); return $str; } function textConverter($str){ $str = utf8_decode(fixBadUnicodeForJson($str)); return $str; } $data = file_get_contents("tiina.json"); $data_traitee = json_decode($data); //echo $data_data_traitee; //print_r($data_traitee); //echo $data_traitee->participants[0]->name; echo $data_traitee->messages[5]->content; foreach($data_traitee->messages as $message){ //echo '<p class="message">'.textConverter($message->content).'</p>'; //echo "<p class=\"message\">$message->content</p>"; $test1 = strpos($message->content, 'non'); $test2 = strpos($message->content, 'pas'); if($test1 != false && $test2 != false){ echo '<p class="message">'.textConverter($message->content).'</p>'; } } ?></pre> Récupérée de « http://curlybraces.be/wiki/index.php?title=ERG::Code-2018-2&oldid=3344 »
Enregistrer Prévisualiser Voir les modifications Annuler