Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <h1>get the import text for textexpander 2 from extentions.json</h1>
- <form method="post">
- <textarea id="w3review" name="w3review" rows="4" cols="50">
- Paste content from extentsions.json here
- </textarea>
- </html>
- <input type="submit" value="submit" />
- ;
- </form>
- <?php
- $json_file = ($_POST ['w3review']);
- $json_file = str_replace ( 'Extension Settings', 'Extension_Settings', $json_file );
- $json = json_decode ( $json_file );
- echo '<pre>';
- // print_r( $json );
- echo '{';
- $values_arr = array ();
- $firstEco = true;
- foreach ( $json->Extension_Settings as $ext ) {
- if ($ext->extension_id == 'iibninhmiggehlcdolcilmhacighjamp' && stristr ( $ext->key, '@' )) {
- if (! $firstEco) {
- echo ",\n";
- }
- echo '"' . str_replace ( '@', '', $ext->key ) . '":' . $ext->value;
- $firstEco = false;
- }
- }
- echo '}';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement