Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Posts posted by Deoctor

  1. hai

    I am testing one of my client site for the integrity against attacks. So i have a form from which they can send the feedback to one of their predefined mail ids. This site was completely done in asp( which i dont know how to code by the way) So i am using php for this purpose. now what doubt i have is that can the form auto submit through code is possible for the asp forms. If yes could some one please help me how to do it. I have checked with the Firebug for the post parameters,it is showing some of the content which i could not able to figure out.

     

     

     

     

     

    POST CONTENTS

    __EVENTARGUMENT __EVENTTARGET __EVENTVALIDATION /wEWwAQCr7jQnwkCsK/0tAoCtL7JqgYCstrOnggCofjD7gIC0MSjhg0CwKuJ6AEC26v16wECyKvB6wECyKup6AEC3qvJ6wEC4OCV5QsCuOrP4Q8C372vjAwC9N2Bxg4CicGDkwsCzoienwwCo9urzA8Cjbqu3gkCt5jYywYCl/3ztA4C/om+yQwC4on6yQwCjbuqBgK3mIjIBgKJ6sS1AwKr75yLAwLK2+qyCQKqvOofAtPiobIEArqK1aEIAvO2i5YMArChyPAEArChpJ0MAoHH/PYGAvPz5coKAoHHtKMMAtLL3UICgce4owwC7bT71woCgcesowwCnPmhmAwCgcewowwCt+K/rQYCgcekowwC5qbm7QcCgceoowwCgZCEgwICgcecowwCsNSqwwMCgce07AcCgZCY8gUCgsfQ7AcCjt2PswoCgsfU7AcCqcatyAQCgsfI7AcCxK/L3Q4CgsfM7AcC35jp8ggCgsfA7AcC+oGHiAMCgsfE7AcCleuknQ0CgsecIwKj7JnlBgKCx6AjAoiD/M8MAoLHlCMCqav4uwgCgseYIwKOwtqmDgL/xrQjAoH12uUJAv/GuCMC5ou90A8C/8asIwK3x5aQDgL/xoRTAontg4gBAv/G+FICkPuY8gMC/8b8UgKr5LaHDgL/xvBSAtqo3ccPAv/G9FIC9ZH73AkC/8boUgL8n5DHDAL/xuxSApeJrtwGAoDHjOgDAtyQ8JYJApD1t7cJApLH6tANAr/42NQJApK80LIGAoLT+twKAp/Tjt8KAsPYyqIMAvSyivwEApjTit8KAofv0L0CAruS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BAKzv8qxCgKvu6TWDQLHk9z/BwL6vq+iAgL8mO+iBAL33/rlCQLuvrOSDQKw1p59AvWIhd0IAuPzi6ENAufz1ZULAtG63wsCjY/Tug0Cn6aLtwYCnIP69Q4CmoL1+AoCp8brogsCptv5gQgCg8i33Q4Cv9nEiw0Cy5O84wgCqOzH2Q8C4sXa+g4CqZW0zQoCnoqZmAcCh4bJwg0Ch4bJwg0C2rDogAICr+G54AoCqLfehwoC0dDU6QQCz87HsgYCntSzpQ0CnsK1MwL0h72yCQK+pJOuCgK0pPrtDALo57AtAsnGyqwDAqCFvMUIAriFgOgIAsXP7osBAoj1t6gDAsulm8AOAsLY/fUPApb6yvAOApif+qkIArLmifUDAqj0/PsEAuyFqb0MAsSJ9tUCAoeL5MoEApmH3boBApiH3boBApuH3boBApqH3boBAurX4coBAuvX4coBAujX4coBAunX4coBApHP1poKAo7P1poKAo/P1poKAozP1poKArmbjooHAribjooHArubjooHArqbjooHAsK0/9oJAt20/9oJAty0/9oJAt+0/9oJApTkraENApXkraENApbkraENApfkraENAqednfEHAridnfEHArmdnfEHArqdnfEHApuS24oCApqS24oCApmS24oCApiS24oCApjBu7EFAofBu7EFAobBu7EFAoXBu7EFAs2I7qsDAt6IoqgDAsGIoqgDAsCIoqgDAsOIoqgDAsKIoqgDAsWIoqgDAsSIoqgDAseIoqgDAtaIoqgDAtmIoqgDAsGI4qsDAsGI7qsDAsGI6qsDAsGI1qsDAsGI0qsDAsGI3qsDAsGI2qsDAsGIxqsDAsGIgqgDAuq/wLYFAvm/jLUFAua/jLUFAue/jLUFAuS/jLUFAuW/jLUFAuK/jLUFAuO/jLUFAuC/jLUFAvG/jLUFAv6/jLUFAua/zLYFAua/wLYFAua/xLYFAua/+LYFAua//LYFAua/8LYFAua/9LYFAua/6LYFAua/rLUFAofVop0PApTV7p4PAovV7p4PAorV7p4PAonV7p4PAojV7p4PAo/V7p4PAo7V7p4PAo3V7p4PApzV7p4PApPV7p4PAovVrp0PAovVop0PAovVpp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/LoEAsef/LoEAsif/LoEAtCfvLkEAtCfsLkEAtCftLkEAtCfiLkEAtCfjLkEAtCfgLkEAtCfhLkEAtCfmLkEAtCf3LoEArPD1vkLAqDDmvoLAr/DmvoLAr7DmvoLAr3DmvoLArzDmvoLArvDmvoLArrDmvoLArnDmvoLAqjDmvoLAqfDmvoLAr/D2vkLAr/D1vkLAr/D0vkLAr/D7vkLAr/D6vkLAr/D5vkLAr/D4vkLAr/D/vkLAr/DuvoLApas9BIChay4EQKarLgRApusuBECmKy4EQKZrLgRAp6suBECn6y4EQKcrLgRAo2suBECgqy4EQKarPgSApqs9BICmqzwEgKarMwSApqsyBICmqzEEgKarMASApqs3BICmqyYEQK7wYfPDAK5gco+AtHsltIMArGFitkJAv/3gcwMAoXOuvwBHrJV5h+nkqGwomKGigE8y3SB5TI= __LASTFOCUS __SCROLLPOSITIONX 0 __SCROLLPOSITIONY 342 btnSend.x 49 btnSend.y 18 hiddenInputToUpdateATBuff... 1 international -2 txtComments jhf,mdsnfhkldsnfm,lhdslknhf,dsakf txtFeedEmail test@yd.com txtFullName kjgkjkjh txtMobile 09374093809 ucHeader$domestic -1 ucQuickSearch$UCHotelinIn... 1 ucQuickSearch$UCHotelinIn... 1 ucQuickSearch$UCHotelinIn... 1 ucQuickSearch$UCHotelinIn... 1 ucQuickSearch$UCHotelinIn... 0 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... 0 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... 0 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... 0 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... -1 ucQuickSearch$UCHotelinIn... 0 ucQuickSearch$UCHotelinIn... 1 ucQuickSearch$UCHotelinIn... ucQuickSearch$UCHotelinIn... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... Sep ucQuickSearch$UcFixedTour... 0 ucQuickSearch$UcFixedTour... 2012 ucQuickSearch$UcFixedTour... 0 ucQuickSearch$UcFixedTour... 09/01/2012 ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... 09/02/2012 ucQuickSearch$UcFixedTour... 09/03/2012 ucQuickSearch$UcFixedTour... 09/04/2012 ucQuickSearch$UcFixedTour... 09/05/2012 ucQuickSearch$UcFixedTour... 09/06/2012 ucQuickSearch$UcFixedTour... 09/07/2012 ucQuickSearch$UcFixedTour... 09/08/2012 ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... 09/09/2012 ucQuickSearch$UcFixedTour... 09/10/2012 ucQuickSearch$UcFixedTour... 09/11/2012 ucQuickSearch$UcFixedTour... 09/12/2012 ucQuickSearch$UcFixedTour... 09/13/2012 ucQuickSearch$UcFixedTour... 09/14/2012 ucQuickSearch$UcFixedTour... 09/15/2012 ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... 09/16/2012 ucQuickSearch$UcFixedTour... 09/17/2012 ucQuickSearch$UcFixedTour... 09/18/2012 ucQuickSearch$UcFixedTour... 09/19/2012 ucQuickSearch$UcFixedTour... 09/20/2012 ucQuickSearch$UcFixedTour... 09/21/2012 ucQuickSearch$UcFixedTour... 09/22/2012 ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... 09/23/2012 ucQuickSearch$UcFixedTour... 09/24/2012 ucQuickSearch$UcFixedTour... 09/25/2012 ucQuickSearch$UcFixedTour... 09/26/2012 ucQuickSearch$UcFixedTour... 09/27/2012 ucQuickSearch$UcFixedTour... 09/28/2012 ucQuickSearch$UcFixedTour... 09/29/2012 ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... 09/30/2012 ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... 9/24/2012 5:32:49 PM ucQuickSearch$UcFixedTour... 9/25/2012 5:32:49 PM ucQuickSearch$UcFixedTour... 0 ucQuickSearch$UcFixedTour... September 2012 ucQuickSearch$UcFixedTour... ucQuickSearch$UcFixedTour... ucQuickSearch$UcHotelInSo... 1 ucQuickSearch$UcHotelInSo... 0 ucQuickSearch$UcHotelInSo... 1 ucQuickSearch$UcHotelInSo... ucQuickSearch$UcHotelInSo... ucQuickSearch$UcSpecialTo... ucQuickSearch$UcSpecialTo... Sep ucQuickSearch$UcSpecialTo... 0 ucQuickSearch$UcSpecialTo... 2012 ucQuickSearch$UcSpecialTo... 0 ucQuickSearch$UcSpecialTo... 09/01/2012 ucQuickSearch$UcSpecialTo... 09/02/2012 ucQuickSearch$UcSpecialTo... 09/03/2012 ucQuickSearch$UcSpecialTo... 09/04/2012 ucQuickSearch$UcSpecialTo... 09/05/2012 ucQuickSearch$UcSpecialTo... 09/06/2012 ucQuickSearch$UcSpecialTo... 09/07/2012 ucQuickSearch$UcSpecialTo... 09/08/2012 ucQuickSearch$UcSpecialTo... 09/09/2012 ucQuickSearch$UcSpecialTo... 09/10/2012 ucQuickSearch$UcSpecialTo... 09/11/2012 ucQuickSearch$UcSpecialTo... 09/12/2012 ucQuickSearch$UcSpecialTo... 09/13/2012 ucQuickSearch$UcSpecialTo... 09/14/2012 ucQuickSearch$UcSpecialTo... 09/15/2012 ucQuickSearch$UcSpecialTo... 09/16/2012 ucQuickSearch$UcSpecialTo... 09/17/2012 ucQuickSearch$UcSpecialTo... 09/18/2012 ucQuickSearch$UcSpecialTo... 09/19/2012 ucQuickSearch$UcSpecialTo... 09/20/2012 ucQuickSearch$UcSpecialTo... 09/21/2012 ucQuickSearch$UcSpecialTo... 09/22/2012 ucQuickSearch$UcSpecialTo... 09/23/2012 ucQuickSearch$UcSpecialTo... 09/24/2012 ucQuickSearch$UcSpecialTo... 09/25/2012 ucQuickSearch$UcSpecialTo... 09/26/2012 ucQuickSearch$UcSpecialTo... 09/27/2012 ucQuickSearch$UcSpecialTo... 09/28/2012 ucQuickSearch$UcSpecialTo... 09/29/2012 ucQuickSearch$UcSpecialTo... 09/30/2012 ucQuickSearch$UcSpecialTo... 9/24/2012 5:32:49 PM ucQuickSearch$UcSpecialTo... 9/25/2012 5:32:49 PM ucQuickSearch$UcSpecialTo... 0 ucQuickSearch$UcSpecialTo... September 2012 ucQuickSearch$UcSpecialTo... ucQuickSearch$UcSpecialTo... ucQuickSearch$hdMenuSubTa...

  2. Thanks for the reply. I have one more doubt. I guess the

    RewriteCond %{HTTP_HOST}
    would not be necessary if i am using this on a single site right

    coz i have tried this

     

    RewriteEngine on
    #RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.*)$ $1.php

     

     

    and it is working fine

  3. you can use the database to store the number of times a user visited the particular video page and then restrict the same while he is trying to visit the same page again. But there is one flaw in this. if the user refreshes the page by any reason due to the slow internet then he will be said as that he already saw that video. I guess someone else would give u a better idea than this, by the time i guess u can start with this

  4. I just want to point out that you don't need to have Xampp installed to use mysqldump. You just need the mysqldump client.

    I just gave him a sample of xampp for mentioning the path of the mysqldump.exe

    Also, you can use the -P (port) and -h (host) flags to get a dump from a remote server.

    Q2: Can i create a backup of my database just like its being done via cron jobs when i am using it locally on my Personal computer and the backup of my database keeps on saving as SQL file (lets say) in my D: drive??

    If you read his question again he had mentioned that to get the dump from the localmachine so he might be not requiring these.

     

  5. You can change the php.ini file and search for the post_max_size and upload_max_filesize update these two with the required sizes you require and restart the apache.

     

     

    Example :

     

    post_max_size = 999M

     

    upload_max_filesize = 999M

     

     

    For the second question you can try something like this.

    consider you have xampp installed in your system.

    c:\xampp\mysql\bin\mysqldump.exe -uroot -ppassword --databases xyzdb > d:\bkup\xyzdb.sql

    copy this same to a txt file and rename it as a bat and then try using the scheduler under the control panel to run it at a timed interval

  6. oops. Sorry that i could not be more specific ,thank you for your reply any way I have resolved it.

    What  i wanted was instead of repeating the same value in the array for all others i wanted something like for 401 it should show one value where as for others it should show other values

     

     

    for this to achieve

    this small change in the code need to be done

     

    <script type="text/javascript">
    function doIt(objval)
    {
    document.getElementById("msg").firstChild.nodeValue= (objval === "401") ? 'Local path' : 'URL or Local path ';
    
    }
    </script>

  7. hai

    i am new to javascript so please try to bare with me.

    i have a code which does the job of changing the value show at the bottom of select box dynamically. but the thing is it should actually need to change between only two values only so how can i change the script to do that

    <code>

    <html>

    <head>

    <script type="text/javascript">

    myarr=new Array()

    myarr[401] = "Local path "

    myarr[403] = "URL or Local path "

    myarr[404] = "URL or Local path "

    myarr[405] = "URL or Local path "

    myarr[406] = "URL or Local path "

    myarr[407] = "URL or Local path "

    myarr[408] = "URL or Local path "

    myarr[409] = "URL or Local path "

    myarr[410] = "URL or Local path "

    myarr[411] = "URL or Local path "

    myarr[412] = "URL or Local path "

    myarr[413] = "URL or Local path "

    myarr[414] = "URL or Local path "

    myarr[415] = "URL or Local path "

    myarr[500] = "URL or Local path "

    myarr[501] = "URL or Local path "

    myarr[502] = "URL or Local path "

    myarr[503] = "URL or Local path "

    myarr[504] = "URL or Local path "

    myarr[505] = "URL or Local path "

     

     

    function doIt(objval)

    {

    document.getElementById("msg").firstChild.nodeValue=myarr[objval];

     

    }

     

    </script>

    </head>

    <body>

    <form name="myform">

    <select name="code" onChange="doIt(this.options[this.selectedIndex].value)">

    <option value="401">401 Authorization Required</option>

    <option value="403">403 Forbidden</option>

    <option value="404">404 Not Found</option>

    <option value="405">405 Method Not Allowed</option>

    <option value="406">406 Not Acceptable (encoding)</option>

     

    <option value="407">407 Proxy Authentication Required</option>

    <option value="408">408 Request Timed Out</option>

    <option value="409">409 Conflicting Request</option>

    <option value="410">410 Gone</option>

    <option value="411">411 Content Length Required</option>

    <option value="412">412 Precondition Failed</option>

     

    <option value="413">413 Request Entity Too Long</option>

    <option value="414">414 Request URI Too Long</option>

    <option value="415">415 Unsupported Media Type</option>

    <option value="500">500 Internal Server Error</option>

    <option value="501">501 Not Implemented</option>

    <option value="502">502 Bad Gateway</option>

     

    <option value="503">503 Service Unavailable</option>

    <option value="504">504 Gateway Timeout</option>

    <option value="505">505 HTTP Version Not Supported</option>

    </select>

    <!--<span id="msg">Keyword</span>-->

    <label style="display:block;margin-top:0.5em" id="msg">Local path

    <input type="text" size="30" name="path" id="path" /></label>

    </form>

    </body>

    </html>

    </code>

  8.  

    so as drong told if you have a link between these two tables then pass the value of the id of the topic as the input to the content page to show the content by using the $_GET['string'] the string could be any thing.

     

     

     

     

    Ok. This is what i mean: i want users to post Essays on my site just like a forum. what i did was i stored the topics of those Essays in a table i named TOPICS and the body of the Essay to another table i called CONTENT, i have selected all the topics and echoed it out on a page so that intrested users can click on them and read the whole Essay but my problem is how i can link those TOPICS to their specific CONTENTS. THanks

  9. try this

    select date_format(CURRENT_TIMESTAMP() + interval 1 day,'%Y-%m-%d %H:%i:%S') as tomorrow;

     

     

    you can use this without the date_format if you like to get exactly the same format as now(). like this

     

     

    select (CURRENT_TIMESTAMP() + interval 1 day);

  10. You have an error with your $source_file and the $destination_file variables

     

     

    try to change those like these.

     

     

     

    $source_file=$_FILES['file']['tmp_name'];// retrieve name of the file to be uploaded
    $destination_file=$_FILES['file']['name'];

     

     

    Hopefully this works!  :P

  11. hai

    i have got a new server and tried to upload something on this. unfortunately i have made a php file with just open and close tags

    <?php ?>

    This is showing me the output as 0

    when i tried to do the same on my local machine it is showing nothing just a blank page.

    Anybody could help me why is this? Is something wrong with the server.

     

     

    Url of the sever where it is showing zero : chaituyanamadala.com/test.php

    PHP info of the server : chaituyanamadala.com/phpinfo.php

     

     

     

     

  12. i have wrote one code which reads the html content line by line and downloads all the images and then make a zip of the folder and sends them to the mail.. I could not able to get Why is this not working. Any help would be greatly appreciated.

     

     

    <?php
    session_start();
    $ses_id = session_id();
    session_unset();
    session_destroy();
    $text = file_get_contents("http://drvirusindia.com"); 
    error_reporting(E_STRICT);
    preg_match_all("/<img(.*?)src=\"http:\/\/(.*?)\"/",$text, $results,PREG_PATTERN_ORDER);
    date_default_timezone_set('America/Toronto');
    rrmdir("images/$ses_id");
    mkdir("images/$ses_id");
    foreach($results[2] as $res){
       // print "Test-->".$res."<br>";
       $remoteImage = "http://".$res;
       save_image($remoteImage,"images/$ses_id/".basename($remoteImage)); 
        if(getimagesize("images/$ses_id/".basename($remoteImage))){
            echo '<h3 style="color: green;">Image ' . basename($remoteImage) . ' Downloaded OK</h3>';
       }else{
            echo '<h3 style="color: red;">Image ' . basename($remoteImage) . ' Download Failed</h3>';
        }
        #exit;
    }
    Zip("images/$ses_id/","images/$ses_id".".zip");
    require_once('mailer/class.phpmailer.php');
    //include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
    
    
    $mail             = new PHPMailer();
    
    
    // print "Body --> ".$body."<br>";
    $body             = $text;
    $body             = eregi_replace("[\]",'',$body);
    $mail->IsSMTP(); // telling the class to use SMTP
    $mail->Host       = ""; // SMTP server
    $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
                                               // 1 = errors and messages
                                               // 2 = messages only
    $mail->SMTPAuth   = true;                  // enable SMTP authentication
    $mail->Host       = "smtpserver"; // sets the SMTP server
    $mail->Port       = 587;                    // set the SMTP port for the GMAIL server
    $mail->Username   = "username"; // SMTP account username
    $mail->Password   = "password";        // SMTP account password
    
    
    $mail->SetFrom('robot@mailmebot.com', 'teset');
    
    
    $mail->AddReplyTo("robot@mailmebot.com","test");
    
    
    $mail->Subject    = "Test Zip attachment";
    
    
    $mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
    
    
    $mail->MsgHTML($body);
    
    
    $address = "dr.virus.india@gmail.com";
    $mail->AddAddress($address, "");
    #exit;
    $mail->AddAttachment("images/$ses_id".".zip"); 
    
    
    if(!$mail->Send()) {
      echo "Mailer Error: " . $mail->ErrorInfo;
    } else {
      echo "Message sent!";
      rrmdir("images/$ses_id");
    }
    function save_image($img,$fullpath='basename'){
        if($fullpath=='basename'){
          $fullpath = "images/$ses_id/";
            $fullpath .= basename($img);
        }
        $ch = curl_init ($img);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
        $rawdata=curl_exec($ch);
        curl_close ($ch);
        if(file_exists($fullpath)){
            unlink($fullpath);
        }
        $fp = fopen($fullpath,'x');
        fwrite($fp, $rawdata);
        fclose($fp);
    }
    
    
    function rrmdir($dir) { 
       if (is_dir($dir)) { 
         $objects = scandir($dir); 
         foreach ($objects as $object) { 
           if ($object != "." && $object != "..") { 
             if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object); 
           } 
         } 
         reset($objects); 
         rmdir($dir); 
       } 
    }
    function Zip($source, $destination)
    {
        if (extension_loaded('zip') === true)
        {
            if (file_exists($source) === true)
            {
                $zip = new ZipArchive();
    
    
                if ($zip->open($destination, ZIPARCHIVE::CREATE) === true)
                {
                    $source = str_replace('\\', '/', realpath($source));
    
    
                    if (is_dir($source) === true)
                    {
                        $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST);
    
    
                        foreach ($files as $file)
                        {
                            $file = str_replace('\\', '/', realpath($file));
    
    
                            if (is_dir($file) === true)
                            {
                                $zip->addEmptyDir(str_replace($source . '/', '', $file . '/'));
                            }
    
    
                            else if (is_file($file) === true)
                            {
                                $zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file));
                            }
                        }
                    }
    
    
                    else if (is_file($source) === true)
                    {
                        $zip->addFromString(basename($source), file_get_contents($source));
                    }
                }
    
    
                return $zip->close();
            }
        }
    
    
        return false;
    }
    ?>

     

     

    it gives an output like this.

     

     

    Image genericlogo.png Downloaded OKImage sshot-17_thumb.png Downloaded OKImage sshot-6_thumb2.png Downloaded OKImage ip-300x225.jpg Downloaded OKImage sshot4ea03907359e9.png Downloaded OKImage ss-480-0-1-180x300.jpg Downloaded OKImage b1Z5FGDk-iphone3g-face-s-.png Downloaded OKImage sXoeeOzf-win7-s-.png Downloaded OKImage dxjWP0NG-exit-ex-s-.png Downloaded OKImage 817-windows-s-.png Downloaded OKImage images-4.jpg Downloaded OKImage 346510_700b.jpg Downloaded OKImage banner3.png Downloaded OKImage ?t=1318576167&i=20203 Download FailedImage paypal_transactions.png Download FailedImage ?t=1318595650&i=20227 Download FailedImage move_cloud_files.png Download FailedImage images-3.jpg Downloaded OKImage 8267.Windows_2D00_3.0_2D00_Task_2D00_List_5F00_th umb_5F00_6E7D7885.png Download FailedImage php.jpg Downloaded OKImage photo.jpg Downloaded OKImage hosting-badge-5.png Downloaded OKSMTP -> FROM SERVER:220 ESMTP Fri, 28 Oct 2011 02:37:24 -0400: UCE strictly prohibited

     

    SMTP -> FROM SERVER: 250-authsmtp09.yourhostingaccount.com Hello localhost [122.181.6.50] 250-SIZE 34603008 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250-HELP 250 STARTTLS

     

     

     

    Can somebody help me

×
×
  • 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.