Jump to content

Panta

Members
  • Posts

    115
  • Joined

  • Last visited

Posts posted by Panta

  1. `   <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script><script>var maxwords = 250;//function check_length(obj, cnt, rem){    var ary = obj.value.split(" "); // doubled spaces will throw this off    var len = ary.length;    cnt.innerHTML = len;    rem.innerHTML = maxwords - len;    if (len > maxwords) {        alert("Message in '" + obj.name + "' limited to " + maxwords + " words.");        ary = ary.slice(0,maxwords-1);        obj.value = ary.join(" "); // truncate additional words        cnt.innerHTML = maxwords;        rem.innerHTML = 0;        return false;    }    return true;} </script>HTML   <textarea name="Message 1" onkeypress=" return check_length(this, document.getElementById('count1'), document.getElementById('remaining1'));"></textarea>Word count: <span id="count1">0</span>  Words remaining: <span id="remaining1">250</span><textarea name="Message 2" onkeypress=" return check_length(this, document.getElementById('count2'), document.getElementById('remaining2'));"></textarea>Word count: <span id="count2">0</span>  Words remaining: <span id="remaining2">500</span>

    please my problem is that i want the different textarea to work according to its limit, but i notice that both uses same word limit. your help will be appreciated. thanks in advance

  2. please i respect and appreciate this forum, am working on a project that needed people to upload picture which will go with a thumbnail, i have all that working but i really wish i could resize the picture to fixes Max. Height and a Max width, what i mean is that i want the pictures not to exceed some certin fixed height or weight. these are my codes all working fyn but i need help on how to fix the order. thanks as you input ur blessed efforts

    <?phpdefine('UPLOADED_IMAGE_DESTINATION', 'uploads/');define('PROCESSED_IMAGE_DESTINATION', 'logo/');function process_image_upload($Field){    $temp_file_path = $_FILES[$Field]['tmp_name'];    $temp_file_name = $_FILES[$Field]['name'];    list(, , $temp_type) = getimagesize($temp_file_path);    if ($temp_type === NULL) {        return false;    }    switch ($temp_type) {        case IMAGETYPE_GIF:            break;        case IMAGETYPE_JPEG:            break;        case IMAGETYPE_PNG:            break;        default:            return false;    }    $uploaded_file_path = UPLOADED_IMAGE_DESTINATION . $temp_file_name;    $processed_file_path = PROCESSED_IMAGE_DESTINATION . preg_replace('/.[^.]+$/', '.jpg', $temp_file_name);    move_uploaded_file($temp_file_path, $uploaded_file_path);    /*     * PARAMETER DESCRIPTION     * (1) SOURCE FILE PATH     * (2) OUTPUT FILE PATH     * (3) THE TEXT TO RENDER     * (4) FONT NAME -- MUST BE A *FILE* NAME     * (5) FONT SIZE IN POINTS     * (6) FONT COLOR AS A HEX STRING     * (7) OPACITY -- 0 TO 100     * (8) TEXT ANGLE -- 0 TO 360     * (9) TEXT ALIGNMENT CODE -- POSSIBLE VALUES ARE 11, 12, 13, 21, 22, 23, 31, 32, 33     */    $result = create_watermark_from_string(        $uploaded_file_path,        $processed_file_path,        'www.hirectory.com.',        'Arial.ttf',        40,        'CCCCCC',        75,        45,        22    );    if ($result === false) {        return false;    } else {        return array($uploaded_file_path, $processed_file_path);    }}/* * Here is how to call the function(s) */$result = process_image_upload('File1');if ($result === false) {    echo '<br>An error occurred during file processing.';} else {    echo '<br>Original image saved as <a href="' . $result[0] . '" target="_blank">' . $result[0] . '</a>';    echo '<br>Watermarked image saved as <a href="' . $result[1] . '" target="_blank">' . $result[1] . '</a>';}?><form action="" method="post" enctype="multipart/form-data">Select a file to upload for processing<br><input type="file" name="File1"><br><input type="submit" value="Submit File"></form>
  3. Every one of your header lines needs to end with rn. You have "r" in some places, and "rn", they all need to be "rn", and remove the extra line breaks. When you print headers you should see a list of the headers, one header per line, with no empty lines between them.

    $headers .= 'BCC: ' . implode(', ',$email_list) . "rn";

    i have done that but at this line this is how i handled it, is it correct

  4. What errors do you get when you comment-out error reporting?

    i dont have error but the problem is that on this line

    $headers .= 'BCC: ' . implode(', ',$email_list) . "rn"; 
    the emails i have in the $email_list only yahoomails do send but i will not see any in the gmail that i also have listed in $email_list. thank you
  5. please i have been working on a code that will help me send bulk mail to me subscribers, i tried to use BCC but i notice that it works for yahoomail, but does not work for gmail, it sends only to yahoomails in the list and will not send to gmail, please these are my codes i need help

    <?phperror_reporting(0);  if (isset($_POST['formType'])) {    if ($_POST['formType'] === "join_us") {// read the list of emails from the file.$email_list = file("elist.txt");// count how many emails there are.$total_emails = count($email_list);// go through the list and trim off the newline character.for ($counter=0; $counter<$total_emails; $counter++) {   $email_list[$counter] = trim($email_list[$counter]);   }// implode the list into a single variable, put commas in, apply as $to value.$to = "";// how to send an email with BCC$headers  = 'MIME-Version: 1.0' . "r";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "r";// this email may not exist$headers .= 'To: Website <noreply@website.com>' . "r";// this is a good email, that must exist (some user may send a reply)$headers .= 'From: Website <goodExistingEmail@website.com>' . "r";// mails to be delivered to$headers .= 'BCC: ' . implode(', ',$email_list) . "rn";$subject = "My email test.";$message = "Hello morrissing, how are you today bro?";if ( mail($to,$subject,$message, $headers) ) {   echo "The email has been sent!";   } else {   echo "The email has failed!";   }} } ?>
  6. please i have been working on a code that will help me send bulk mail to me subscribers, i tried to use BCC but i notice that it works for yahoomail, but does not work for gmail, it sends only to yahoomails in the list and will not send to gmail, please these are my codes i need help

    <?php
    error_reporting(0);
    if (isset($_POST['formType'])) {
    if ($_POST['formType'] === "join_us") {
    // read the list of emails from the file.
    $email_list = file("elist.txt");
    // count how many emails there are.
    $total_emails = count($email_list);
    // go through the list and trim off the newline character.
    for ($counter=0; $counter<$total_emails; $counter++) {
    $email_list[$counter] = trim($email_list[$counter]);
    }
    // implode the list into a single variable, put commas in, apply as $to value.
    $to = "";
    // how to send an email with BCC
    $headers = 'MIME-Version: 1.0' . "r
    ";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "r
    ";
    // this email may not exist
    $headers .= 'To: Website <noreply@website.com>' . "r
    ";
    // this is a good email, that must exist (some user may send a reply)
    $headers .= 'From: Website <goodExistingEmail@website.com>' . "r
    ";
    // mails to be delivered to
    $headers .= 'BCC: ' . implode(', ',$email_list) . "rn
    ";
    $subject = "My email test.";
    $message = "Hello morrissing, how are you today bro?";
    if ( mail($to,$subject,$message, $headers) ) {
    echo "The email has been sent!";
    } else {
    echo "The email has failed!";
    }
    } }
    ?>
  7. freedownlods.php <?php include('header.php') ;?> <div id="content"> <div class="post" id="post-12"> <h1 > Free Rendering Materials</h1> <div class="entry"> <div class="featured-image"> </div> <p class="url" > <p class="style3"> <strong>Revit</strong></p> <ol> <li> Click here to Download <a href="download.php?file=revit/79-ceilings-an-introduction-to-revit-ceilings.pdf">Revit Ceilings</a> </li> <li>Click here to Download <a href="download.php?file=revit/Revit_2011_to_ATL3_Win32.zip">Revit 2010 to Artlantics 3.0 plugin</a> </li> </li> </ol> <p class="style3"><strong> 3D max</strong></p> <ol> <li>Click here to Download <a href="">Max Cars</a></li> <li>Click here to Download <a href="">Max Tutorials</a> </li> </ol> <p class="style3"><strong> Shaders and Billboards</strong> </p> <ol> <li>Click here to Download <a href="">Raster Images</a> </li> <li>Click here to Download <a href="">Shaders</a></li> </ol> <p class="style3"><strong> Artlantics</strong></p> <ol> <li>Click here to Download <a href="download.php?file=artlantics/billboards.rar">Billboard and Shaders</a></li> <li>Click here to Download <a href="download.php?file=artlantics/artlantis_tutorial_script.pdf">Artlantics Tutorial</a></li> <li> Click here to Download <a href="">Artlantics Objects</a> </li> </ol> <strong style="color:#F00">Total</strong> <strong style="color:#F00">Site downloads <?php $fp=fopen("downloads.txt","r");$count=fgets($fp,1024);echo $count;?></strong><?php include('footer.php');?>End of freedownload.phpdownload.php$file_directory = "files"; //Name of the directory where all the sub directories and files exists$file = $_GET['file']; //Get the file from URL variable$file_array = explode('/', $file); //Try to seperate the folders and filename from the path$file_array_count = count($file_array); //Count the result$filename = $file_array[$file_array_count-1]; //Trace the filename$file_path = dirname(__FILE__).'/'.$file_directory.'/'.$file; //Set the file path w.r.t the download.php... It may be different for u.if(file_exists($file_path)) {header("Content-disposition: attachment; filename={$filename}"); //Tell the filename to the browser header('Content-type: application/octet-stream'); //Stream as a binary file! So it would force browser to download readfile($file_path); //Read and stream the file$site="freedownloads.php";include('count.php');//including download countsheader('Refresh: 2; URL='.$site);}else { echo "Sorry, the file does not exist! Please check the file in the directory";}}?>End of download.php

  8. Please am new with php and I just uploaded my first site and in that my site I do encounter two problems that I don't see when using my local server.the first one is the main problem is that I have some tutorials I wish that people can download.in my local server if I try to download it will. Downlod.but now on the live server if I try to downlod it will just display a lot of code on the page ,and these code will come with numbers and alphabet.I guess there is somtin I ve not done write.plz I need help so that materials can be downloaded.the site is http://avatconcepts.com.ng/freedownloads.php

  9. please am still new with php, i have a script that has been working well with my local server, but now i have uploaded it with my host.but my problem is that after registeration , when i try to login i will see an error message"Warning: Cannot modify header information - headers already sent by (output started at /home/avatconc/public_html/servicesdrawing.php:2) in /home/avatconc/public_html/libforall.php on line 94"please i dont know what to do , i need help.thanks

×
×
  • Create New...