Jump to content

yosii

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by yosii

  1. hi i want to know 2 thing please 1)how can i change encoding of file to utf-8 with php please? it is CSV file.... 2)how can i convert EXEL file to CSV file with PHP please? thank !!!
  2. i have string like that A11AA9AA7A and i want to print all the number between A this need be the result 11 9 7 every number is between A A234AA433AA413AA0AA222AA2456A <?php $FILE='A11AA9AA7A'; preg_match_all("A"(.*)\"A", $FILE, $results); print_r($results); ?> that now work pleaes help
  3. i want that only 1 from will show and it will auto send
  4. <html> <head> </head> <body> BLA BLA BLA BLA BLA BLA BLA BLA V BLA BLA <img src='a.gif' /> <img src='e.gif' /> <img src='vv.gif' /> <img src='ff.gif' /> <form id="a1" action="5.php" method="post" > <INPUT TYPE="hidden" value="111111" NAME="name" > <INPUT TYPE="hidden" value="22222" NAME="add" > </form> <script> document.getElementById('a1').submit() </script> BLA BLA BLA BLA BLA BLA BLA BLA V BLA BLA <img src='f.gif' /> <img src='1.gif' /> <img src='3.gif' /> <img src='6.gif' /> BLA BLA BLA BLA BLA BLA BLA BLA V BLA BLA <form id="a2" action="5.php" method="post" > <INPUT TYPE="hidden" value="xxx1" NAME="name" > <INPUT TYPE="hidden" value="22222" NAME="add" > </form> </body> </html> ass you see there is lot of image text and forms there is function in js that make the form(a1) that it auto send .... hoe can i do that the form +js function load first and all of the images and txt the the another forms not be load how? thank
  5. or like this <html> <head> <script> document.getElementById('a1').submit() </script> </head> <body> <form id="a1" action="5.php" method="post" > <INPUT TYPE="hidden" value="111111" NAME="name" > <INPUT TYPE="hidden" value="22222" NAME="add" > </form> </body> </html> not work
  6. <html> <head> <script> document.getElementById('a1').submit() </script> </head> <body> <form name="a1" action="5.php" method="post" > <INPUT TYPE="hidden" value="111111" NAME="name" > <INPUT TYPE="hidden" value="22222" NAME="add" > </form> </body> </html> why it is not work?
  7. NO GOOD it is work only if i want a b c i want to write full sentencses there!
  8. work! can you explain me why did you add id="sel" and send it to getSelectedText('sel') what this function do? thank
  9. I WANT TO CHANGE the value of div in firefox it is work in chrome no why please???
  10. in 2.php only write D. And i dont write echo before the include and this same problem.look on the code that in exec that i wrote meby the problem there
  11. Wherever you wrote: [exec]echo include('2.php');[/exec] Change it to: [exec]include('2.php');[/exec] I if i only write include without echo this not write 1?
  12. where i can cange it that will not print the 1 this is the file wp-content/plugins/wp-exec-php/wp-exec-php.php <?php /* Plugin Name: WP exec PHP Plugin URI: http://tom-thorogood.gotdns.com/plugins/wp-exec-php/ Description: Execute PHP inside posts, pages and text widgets. Use [exec][/exec] to execute PHP. Version: 1.0 Author: Tom Thorogood Author URI: http://tom-thorogood.gotdns.com/ Inspired by PHP Exec by Priyadi Iman Nurcahyo http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/ */ /* * NOTICE: * If you notice any issues or bugs in the plugin please email them to tom.thorogood@ymail.com * If you make any revisions to and/or re-release this plugin please notify tom.thorogood@ymail.com */ /* * Copyright ? 2010 Tom Thorogood (email: tom.thorogood@ymail.com) * * This file is part of "WP exec PHP" Wordpress Plugin. * * "WP exec PHP" is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * "WP exec PHP" is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with "WP exec PHP". If not, see <http://www.gnu.org/licenses/>. */ function _wp_exec_php_execute($matches) { $m1 = trim($matches[1]); if (!empty($m1)) { ob_start(); eval($matches[1]); return ob_get_clean(); } } function wp_exec_php_do($text = '') { return preg_replace_callback('/\[exec\](.*)\[\/exec\]/Us', '_wp_exec_php_execute', $text); } function wp_exec_php_content($text = '') { global $wp_exec_php_options; $userdata = get_userdata(get_the_author_meta('ID')); if ($userdata && $userdata->user_level >= $wp_exec_php_options['level']) return wp_exec_php_do($text); else return preg_replace('/\[exec\](.*)\[\/exec\]/Us', '', $text); } function wp_exec_php_parse_options($options, $prefix = '') { global $wp_exec_php_defaults; if (isset($options[$prefix . 'level']) && !is_int($options[$prefix . 'level']) && is_numeric($options[$prefix . 'level'])) $options[$prefix . 'level'] = intval($options[$prefix . 'level']); if (isset($options[$prefix . 'level']) && (!$options[$prefix . 'level'] || !is_numeric($options[$prefix . 'level']) || $options[$prefix . 'level'] <= 0 || $options[$prefix . 'level'] >= 9)) unset($options[$prefix . 'level']); $options[$prefix . 'support'] = (isset($options[$prefix . 'support']) && $options[$prefix . 'support']); $options[$prefix . 'widget'] = (isset($options[$prefix . 'widget']) && $options[$prefix . 'widget']); $return = array(); foreach($wp_exec_php_defaults as $key => $value) { if (isset($options[$prefix . $key]) && /*!empty($options[$prefix . $key]) &&*/ $options[$prefix . $key] != $value) $return[$key] = $options[$prefix . $key]; } return $return; } function wp_exec_php_options_page() { global $wp_exec_php_options; if (isset($_POST['wp-exec-php-submit'])) { global $wp_exec_php_defaults; $opts = wp_exec_php_parse_options($_POST, 'wp-exec-php_'); $wp_exec_php_options = (($opts && count($opts) >= 1) ? @array_merge($wp_exec_php_defaults, $opts) : $wp_exec_php_defaults); if (!$wp_exec_php_options) $wp_exec_php_options = $wp_exec_php_defaults; update_option('wp-exec-php', maybe_serialize($opts)); echo "\t" . '<div class="updated"><p>Options saved successfully.</p></div>' . "\n"; } ?> <div class="wrap"> <h2>WP exec PHP Options</h2> <form method="post"> <fieldset class="options"> <table style="width: 100%;" cellspacing="2" cellpadding="5" class="editform"> <tr> <th style="width: 20%; font-weight: normal; font-size: 0.9em;" scope="row">User Level:</th> <td><input name="wp-exec-php_level" type="text" value="<?php echo $wp_exec_php_options['level']; ?>" size="1" maxlength="1" /> The minimum <a href="http://codex.wordpress.org/User_Levels" target="_blank">user level</a> required to run PHP in posts.</td> </tr> <tr> <th style="width: 20%; font-weight: normal; font-size: 0.9em;" scope="row">Execute in Widgets:</th> <td><input name="wp-exec-php_widget" type="checkbox"<?php if ($wp_exec_php_options['widget']) { echo ' checked="checked"'; } ?> /> Wheather or not to execute PHP inside text widgets.</td> </tr> <tr> <th style="width: 20%; font-weight: normal; font-size: 0.9em;" scope="row">Display powered by link:</th> <td><input name="wp-exec-php_support" type="checkbox"<?php if ($wp_exec_php_options['support']) { echo ' checked="checked"'; } ?> /> Support the plugin.</td> </tr> </table> <p class="submit"><input type="submit" name="wp-exec-php-submit" value="Save" /></p> </fieldset> </form> </div> <?php } function wp_exec_php_add_options_page() { add_options_page('WP exec PHP', 'WP exec PHP', 9, 'wp-exec-php.php', 'wp_exec_php_options_page'); } function wp_exec_php_footer() { echo '<p id="wp-exec-php-footer" style="margin:0 auto 0 auto;font-size:0.8em;padding:0 0 7px 0;text-align:center;">Powered by <a href="http://tom-thorogood.gotdns.com/wordpress-plugins/wp-exec-php/" target="_blank">WP exec PHP</a>.</p>'; } function wp_exec_php_init() { global $wp_exec_php_init, $wp_exec_php_defaults, $wp_exec_php_options; if ($wp_exec_php_init) return; $wp_exec_php_init = true; $wp_exec_php_defaults = array('level' => 9, 'support' => true, 'widget' => true); $opts = maybe_unserialize(get_option('wp-exec-php')); $wp_exec_php_options = (($opts && count($opts) >= 1) ? @array_merge($wp_exec_php_defaults, $opts) : $wp_exec_php_defaults); if (!$wp_exec_php_options) $wp_exec_php_options = $wp_exec_php_defaults; add_action('admin_menu', 'wp_exec_php_add_options_page'); if ($wp_exec_php_options['support']) add_action('wp_footer', 'wp_exec_php_footer', 1); add_filter('the_content', 'wp_exec_php_content', 1); add_filter('the_excerpt', 'wp_exec_php_content', 1); if ($wp_exec_php_options['widget']) add_filter('widget_text', 'wp_exec_php_do', 1); } $wp_exec_php_defaults = $wp_exec_php_options = $wp_exec_php_init = false; wp_exec_php_init(); ?>
  13. i use in http://wordpress.org/extend/plugins/exec-php/ to write php code in my post but if i write [exec]echo 'S' ; [/exec] this will print S but if i will write [exec]echo include('2.php') ; [/exec] and in 2.php write D this will wirte D1 after all page that i include this add the number 1 i wwant to delete it how???
  14. i want to write the submit out of the from so i do this <input type="submit" value="send it!" name="send_simple" form="addli" /> <form id="addli" action="123.php" enctype="multipart/form-data" method="post"> <input name="userfile[]" type="file" /> <br/> <input name="userfile[]" type="file" /> <br/> <input name="userfile[]" type="file" /> <br/> </form> that not work in mobile and not send the form but if i do this <form id="addli" action="123.php" enctype="multipart/form-data" method="post"> <input type="submit" value="send it!" name="send_simple" form="addli" /> <input name="userfile[]" type="file" /> <br/> <input name="userfile[]" type="file" /> <br/> <input name="userfile[]" type="file" /> <br/> </form> this work why?? how can i do this in my mobile why this code not good thank
  15. i have simple form to upload http://tinyurl.com/c439od8 work good but from iphone i see the <input name="userfile[]" type="file" /> <br/> and i can't click on them to choose file what can i do?
  16. this is my code <?php $zip = new ZipArchive(); $zip = new ZipArchive(); if($zip->open("C.zip",ZIPARCHIVE::CREATE)===TRUE) { $dir = scandir('test/'); $new_dir='test/'; $num=count($dir); for($k=0; $k<=$num; $k++) { if (@$dir[$k]!="." && @$dir[$k]!="" && @$dir[$k]!=".." && @$dir[$k]!="Thumbs.db") { $new_file=$new_dir.$dir[$k]; echo $new_file.'<BR>'; $zip->addFile($new_file); } } $zip->close(); $file = "C.zip"; header ("Content-Type: application/octet-stream"); header ("Accept-Ranges: bytes"); header ("Content-Length: ".filesize($file)); header ("Content-Disposition: attachment; filename=".$file); readfile($file); } ?> what i want is to download folder in rar and becuase of that i run FOR that read and add all my file to the function so.... it is download good and if i enter to the RAR file i see the file that in there...GOOD but when i tried to extract the file i get problem in RAR The archive is either in unknown format or damaged why???? if I do this code diffrend and choose file by file like <?php $zip = new ZipArchive(); $zip = new ZipArchive(); if($zip->open("S.zip",ZIPARCHIVE::CREATE)===TRUE) { $zip->addFile('test/1.GIF'); $zip->addFile('test/2.GIF'); $zip->addFile('test/3.GIF'); $zip->close(); $file = "S.zip"; header ("Content-Type: application/octet-stream"); header ("Accept-Ranges: bytes"); header ("Content-Length: ".filesize($file)); header ("Content-Disposition: attachment; filename=".$file); readfile($file); } ?> this work good that the problem in the FOR that run on all the folder that make problem when i extract the files.. thank
  17. hi i want add to my site multy upload like here http://demo.swfupload.org/v250beta3/simpledemo/index.php SIMPLE.... but i want that the user will can to use multy upload from her smartphone and the problem it that all the multy upload (with php) work with flash.... and iphone not work with flash what can i do??(ask from the user to upload one file after one filr it is not good because they need to upload many file) i will happy to help thank!
  18. I HAVE THIS URL www.SUB.domain.co.il/PAGE i have 2 parameters SUB PAGE i want that url move to this url with hteccess www.domain.co.il/SUB/PAGE how can i do this with hteccess ? thank!
  19. hi this is my page in wordpress http://nerya.rupai.net/wordpress/?p=4 now i want to to 'like' on him so i open this ------------------facebook url--------------------------- ---------------------like url-------------------- http://www.facebook.com/plugins/like.php?href=http://nerya.rupai.net/wordpress/?p=4 but this is a problem this done like to this page http://nerya.rupai.net/wordpress/ and i want to like this page http://nerya.rupai.net/wordpress/?p=4 what can i do please thank!
  20. i have that code http://nerya.rupai.net/1.php simple.... but i want that the image will be in the ipnut like that http://up351.siz.co.il/up2/fiwmekzxmwwf.jpg how can i do that
  21. i looking about css like this http://up351.siz.co.il/up2/yztyedxtwznm.jpg how can i find? i tried to copy the code but it is imposable please help me thank
  22. i have this code <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0"> <channel> <item> <title> tttt1</title> <link>lll1</link> <description> dddd1 </description> </item> <item> <title> tttt2</title> <link>lll2</link> <description> dddd2 </description> </item> <item> <title> tttt3</title> <link>lll3</link> <description> dddd3 </description> </item> and i want go get to array all the details tttt1 lll1 dddd1 tttt2 lll2 dddd2 tttt3 lll3 dddd3 how can i do that simple? I SEE THIS http://il2.php.net/xml_parse but 1)i dont understand this how can i do what i want 2) it is too long and class code i need short and simple please help
  23. hi i have this code RewriteEngine on RewriteRule (.*)/(.*) pages.php?act=$1&page=$2 i just want that if i open this www.xxx.com/111/222 i want that $act =111 $page =222 that work good , but i have problem i have image to this site www.xxx.com/images and that folder don't work how can i do that the folder images will not be in the .htaccess thank!
  24. i thank you about your help so much but look' the loop not stop in the end http://bit.ly/dwri9A
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.