Jump to content

zohab

Members
  • Posts

    223
  • Joined

  • Last visited

Everything posted by zohab

  1. hi In my project i am opening ppt and pps power point slide file in i frame the file is getting open and play in iframe but the problem is that it is asking for open/save/cancel option. i need to click on open file then it get play in iframe or i need to check the checkbox for that. so after that it never ask for open/save/cancel option. i need to disable the open/save/cancel option. coming when i click on link to play slide in iframe. it is coming by default can we disable it using php or javascript or any other method. i need help thanks in advance zohab.
  2. hi all In my project i need to select random records from table with unique values i had implemented this with mysql rand function but i am gettng repated records with this function in sql we have newid() function which gives random+unique records. how can we do this mysql or using php i use rand() as "select * from tablename order by rand()" any help? thanks in advance best regards zohab
  3. hi all I have one combo box with country names . I have another combo box with country states. I need to show values in country states combo box depending on the country name selected in country names combo box. I need to implement this using ajax and php?? best regards zohab
  4. hi all i had installed php on windows server 2003 pc it uses IIS as server. i am getting one session error.something like you have error at session_start() on line xyz,header already send , cashe limit error i would like to know what need to change in php.ini file to remove this error. before this i was getting register_global error ,i make register_globals on in php.ini file so that error had gone. any ideas? thanks in advance. zohab
  5. Thanks for your reply It is working now. I haven't done anything,it is working fine. I would like to know,how can we find out IP address of server(database). if we upload phpinfo(); on server , can we get database server ip address. OR any other way to get IP addrees of server. thanks and best regards zohab
  6. Hi I had used phpmyadmin(mysql) many times in my projects. I connect to it as server(ip address) username password database name. IT always get connect,but now instead of server ip address i have "localhost" It is not getting connect through php code. What need to do. Please help. Best regards zohab
  7. Hi everybody I have one problem , i have one textfield and one link besides it (MORE). When user click on MORE, it need to have one more textfield below it And it need to be unlimited.user click on more it need create more and more textfields. I need to implement this using ajax or javascript. I am not getting how to implement this?(any script to solve above problem) any help? regards zohab.
  8. Hi I have following php script to create zip file . I am able to create zip file of files(.doc,.html,.pdf etc) and images. My problem is when zip file is extracted or when i unzipped it content inside file not seen. In case of images ,i am not able to see any image when it is unzipped. What i need to do. I need help? <?php class zipfile  {      var $datasec = array(); // array to store compressed data     var $ctrl_dir = array(); // central directory      var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"; //end of Central directory record     var $old_offset = 0;     function add_dir($name)      {          $name = str_replace("\\", "/", $name);          $fr = "\x50\x4b\x03\x04";         $fr .= "\x0a\x00";    // ver needed to extract         $fr .= "\x00\x00";    // gen purpose bit flag         $fr .= "\x00\x00";    // compression method         $fr .= "\x00\x00\x00\x00"; // last mod time and date         $fr .= pack("V",0); // crc32         $fr .= pack("V",0); //compressed filesize         $fr .= pack("V",0); //uncompressed filesize         $fr .= pack("v", strlen($name) ); //length of pathname         $fr .= pack("v", 0 ); //extra field length         $fr .= $name;          // end of "local file header" segment         // no "file data" segment for path         // "data descriptor" segment (optional but necessary if archive is not served as file)         $fr .= pack("V",$crc); //crc32         $fr .= pack("V",$c_len); //compressed filesize         $fr .= pack("V",$unc_len); //uncompressed filesize         // add this entry to array         $this -> datasec[] = $fr;         $new_offset = strlen(implode("", $this->datasec));               // now add to central record         $cdrec = "\x50\x4b\x01\x02";         $cdrec .="\x00\x00";    // version made by         $cdrec .="\x0a\x00";    // version needed to extract         $cdrec .="\x00\x00";    // gen purpose bit flag         $cdrec .="\x00\x00";    // compression method         $cdrec .="\x00\x00\x00\x00"; // last mod time & date         $cdrec .= pack("V",0); // crc32         $cdrec .= pack("V",0); //compressed filesize         $cdrec .= pack("V",0); //uncompressed filesize         $cdrec .= pack("v", strlen($name) ); //length of filename         $cdrec .= pack("v", 0 ); //extra field length          $cdrec .= pack("v", 0 ); //file comment length         $cdrec .= pack("v", 0 ); //disk number start         $cdrec .= pack("v", 0 ); //internal file attributes         $ext = "\x00\x00\x10\x00";         $ext = "\xff\xff\xff\xff";          $cdrec .= pack("V", 16 ); //external file attributes  - 'directory' bit set         $cdrec .= pack("V", $this -> old_offset ); //relative offset of local header         $this -> old_offset = $new_offset;         $cdrec .= $name;          // optional extra field, file comment goes here         // save to array         $this -> ctrl_dir[] = $cdrec;              }     function add_file($data, $name)      // adds "file" to archive      // $data - file contents     // $name - name of file in archive. Add path if your want     {          $name = str_replace("\\", "/", $name);          //$name = str_replace("\\", "\\\\", $name);         $fr = "\x50\x4b\x03\x04";         $fr .= "\x14\x00";    // ver needed to extract         $fr .= "\x00\x00";    // gen purpose bit flag         $fr .= "\x08\x00";    // compression method         $fr .= "\x00\x00\x00\x00"; // last mod time and date         $unc_len = strlen($data);          $crc = crc32($data);          $zdata = gzcompress($data);          $zdata = substr( substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug         $c_len = strlen($zdata);          $fr .= pack("V",$crc); // crc32         $fr .= pack("V",$c_len); //compressed filesize         $fr .= pack("V",$unc_len); //uncompressed filesize         $fr .= pack("v", strlen($name) ); //length of filename         $fr .= pack("v", 0 ); //extra field length         $fr .= $name;          // end of "local file header" segment                 // "file data" segment         $fr .= $zdata;          // "data descriptor" segment (optional but necessary if archive is not served as file)         $fr .= pack("V",$crc); //crc32         $fr .= pack("V",$c_len); //compressed filesize         $fr .= pack("V",$unc_len); //uncompressed filesize         // add this entry to array         $this -> datasec[] = $fr;         $new_offset = strlen(implode("", $this->datasec));         // now add to central directory record         $cdrec = "\x50\x4b\x01\x02";         $cdrec .="\x00\x00";    // version made by         $cdrec .="\x14\x00";    // version needed to extract         $cdrec .="\x00\x00";    // gen purpose bit flag         $cdrec .="\x08\x00";    // compression method         $cdrec .="\x00\x00\x00\x00"; // last mod time & date         $cdrec .= pack("V",$crc); // crc32         $cdrec .= pack("V",$c_len); //compressed filesize         $cdrec .= pack("V",$unc_len); //uncompressed filesize         $cdrec .= pack("v", strlen($name) ); //length of filename         $cdrec .= pack("v", 0 ); //extra field length          $cdrec .= pack("v", 0 ); //file comment length         $cdrec .= pack("v", 0 ); //disk number start         $cdrec .= pack("v", 0 ); //internal file attributes         $cdrec .= pack("V", 32 ); //external file attributes - 'archive' bit set         $cdrec .= pack("V", $this -> old_offset ); //relative offset of local header //      &n // bsp; echo "old offset is ".$this->old_offset.", new offset is $new_offset<br>";         $this -> old_offset = $new_offset;         $cdrec .= $name;          // optional extra field, file comment goes here         // save to central directory         $this -> ctrl_dir[] = $cdrec;      }     function file() { // dump out file          $data = implode("", $this -> datasec);          $ctrldir = implode("", $this -> ctrl_dir);          return              $data.              $ctrldir.              $this -> eof_ctrl_dir.              pack("v", sizeof($this -> ctrl_dir)).    // total # of entries "on this disk"             pack("v", sizeof($this -> ctrl_dir)).    // total # of entries overall             pack("V", strlen($ctrldir)).            // size of central dir             pack("V", strlen($data)).                // offset to start of central dir             "\x00\x00";                            // .zip file comment length     } }  ?> <?php include("zip_1.php"); $zipfile = new zipfile();  // add the subdirectory ... important! $zipfile -> add_dir("dir/"); // add the binary data stored in the string 'filedata' $filedata = "(read your file into $filedata)";  $zipfile -> add_file($filedata, "dir/file.txt");  // OR instead of doing that, you can write out the file to the loca disk like this: $filename = "output.zip"; $fd = fopen ($filename, "wb"); $out = fwrite ($fd, $zipfile -> file()); fclose ($fd); // then offer it to the user to download: print "<a href='output.zip'>Click here to download the new zip file.</a>"; ?> thanks in advance. Best regards zohab
  9. Hi I my application i need excute command from command line like c:\\test>test.exe can we excute .exe using php script. I read exec() and system() but i am not able to get it. If yes ,can i get simple example. Best regards zohab.
  10. Thanks for response 8) Can i get simple example.So that it is clear. Best regards zohab.
  11. Hi I want to convert .doc file into .pdf file. How we can implement this using php? I need help? Thanks in advance. Best regards zohab.
  12. Thanks for response. I had refer to link system() and try to understand it. For my clarification can you please give small example of system() so that i will understand it clearly. I had tried example fiven on system() link page but i did not got it. Best regards zohab.
  13. Thanks for response It works ,no problem. It is nice! Best regards zohab.
  14. Hi I have one question? I need to scan file.If file does not contain any virus then upload it otherwise not . Can someone help me how can i do this using [b]PHP[/b]? Thanks in advance. Best regards zohab.
  15. Thank you for your response For my clarification can you please give small example of XML and Php. so that i will understand it clearly. Best regards zohab.
  16. Hi Everbody I have one question? Can anybody give me info. about how about how to use XML in php. Best regads zohab.
  17. Hi Everybody I have one question? Can anybody knows how we can add new templates in typo3 OR How to customized existing template in typo3 Best Regards zohab.
×
×
  • 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.