Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2021
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <html>
  2. <h1>get the import text for textexpander 2 from extentions.json</h1>
  3. <form method="post">
  4.  
  5.  
  6. <textarea id="w3review" name="w3review" rows="4" cols="50">
  7. Paste content from extentsions.json here
  8. </textarea>
  9.  
  10. </html>
  11. <input type="submit" value="submit" />
  12. ;
  13. </form>
  14.  
  15. <?php
  16. $json_file = ($_POST ['w3review']);
  17. $json_file = str_replace ( 'Extension Settings', 'Extension_Settings', $json_file );
  18.  
  19. $json = json_decode ( $json_file );
  20.  
  21. echo '<pre>';
  22. // print_r( $json );
  23. echo '{';
  24. $values_arr = array ();
  25. $firstEco = true;
  26.  
  27. foreach ( $json->Extension_Settings as $ext ) {
  28.  
  29. if ($ext->extension_id == 'iibninhmiggehlcdolcilmhacighjamp' && stristr ( $ext->key, '@' )) {
  30.  
  31. if (! $firstEco) {
  32. echo ",\n";
  33. }
  34.  
  35. echo '"' . str_replace ( '@', '', $ext->key ) . '":' . $ext->value;
  36. $firstEco = false;
  37. }
  38. }
  39.  
  40. echo '}';
  41.  
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement