Jump to content

IamSuchANoob

Members
  • Posts

    29
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

IamSuchANoob's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you for the answer. I have never done this (PDF->XLSX->CSV). Could you tell me, if this output can be used before I am going to figure out how? ;;;;;;;;;;Rehvide valiku tabel;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Mark;;Mudel;;;Mootor;;;;;;;Laius Kõrgus ZR;;"R """;;LI;SI;XL e4txc4;;;;;;;;;;;;;;;;;;;;;;;;
  2. Hello! So, I have a .pdf file which contains information on car tyre parameters (which tyre fits where). The mission is to have that data to show up on a website for the user to be able to search/view it. There is around 30 000 entries and before I go and start copying them one by one into my HTML tables or database I would like to know if you guys got any ideas if I can somehow fasten that process (or do it in another way?). Even better, if you know any kind of API or something that I can just add to website ( example : http://www.michelin.co.uk/ ) that would be great. I don't want to iframe-lame it. Thank you & have an awesome day!
  3. Was probably mailserver... works like a charm on another host. Close please.
  4. I got this piece of code from a free template and I followed all the instructions that came with it, everything seems fine but mail doesn't go trough. HTML: <!--Start Contact form --> <form name="enq" method="post" action="email/" onsubmit="return validation();"> <fieldset> <input type="text" name="name" id="name" value="" class="input-block-level" placeholder="Name.." /> <input type="text" name="email" id="email" value="" class="input-block-level" placeholder="Email.." /> <textarea rows="11" name="message" id="message" class="input-block-level" placeholder="Message.."></textarea> <div class="actions"> <input type="submit" value="Send!" name="submit" id="submitButton" class="btn btn-info pull-right" title="Send!" /> </div> </fieldset> </form> <!--End Contact form --> PHP: <?php if(isset($_POST['submit'])) { $name = $_POST['name']; $email = $_POST['email']; $query = $_POST['message']; $email_from = $name.'<'.$email.'>'; $to="email@sample.com"; $subject="Enquiry!"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "From: ".$email_from."\r\n"; $message=" Name: $name <br> Email-Id: $email <br> Message: $query "; if(mail($to,$subject,$message,$headers)) header("Location:../contact.php?msg=Successful Submission! Thankyou for contacting us."); else header("Location:../contact.php?msg=Error To send Email !"); //contact:-your-email@your-domain.com } ?> JavaScript function validation() { var contactname=document.enq.name.value; var name_exp=/^[A-Za-z\s]+$/; if(contactname=='') { alert("Name Field Should Not Be Empty!"); document.enq.name.focus(); return false; } else if(!contactname.match(name_exp)) { alert("Invalid Name field!"); document.enq.name.focus(); return false; } var email=document.enq.email.value; //var email_exp=/^[A-Za-z0-9\.-_\$]+@[A-Za-z]+\.[a-z]{2,4}$/; var email_exp=/^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; if(email=='') { alert("Please Enter Email-Id!"); document.enq.email.focus(); return false; } else if(!email.match(email_exp)) { alert("Invalid Email ID !"); document.enq.email.focus(); return false; } var message=document.enq.message.value; if(message=='') { alert("Query Field Should Not Be Empty!"); document.enq.message.focus(); return false; } return true; } I don't get any errors but mail doesn't simply go trough, checked spam etc.
  5. //This page should not be accessed directly. Need to submit the form. echo "error; you need to submit the form!";
  6. Yeah, I try to send the user after sending in the form to the page thx.php (just image). I tried the ob_start(); solution but I don't like workarounds. (for example, with ob_start(); the HTML doesn't show up properly for example in RoundCube client).
  7. Hey! I have a problem, I have a PHP script which sends mail from a html form. Weird is, it works great on another host. error: Warning: Cannot modify header information - headers already sent by (output started at /home/sbsbitum/public_html/process2.php:5) in /home/sbsbitum/public_html/process2.php on line 60 php: <?php if(!isset($_POST['submit'])) { //This page should not be accessed directly. Need to submit the form. echo "error; you need to submit the form!"; } $name = $_POST['cformname']; $email = $_POST['cformemail']; $message = $_POST['cformmessage']; //Validate first if(empty($name)||empty($email)) { echo "Name and email are mandatory!"; exit; } if(IsInjected($email)) { echo "Bad email value!"; exit; } $to = 'info@test.com';// to email address // subject $subject = 'Message from homepage.'; // message $body = ' <html> <head> <title>Viesti</title> </head> <body> <img src=""> <table rules="all" style="border-color: #666;" cellpadding="10"> <tr style="background:" #eee;><td><strong>Nimi:</strong></td><td>'.$name.'</td></tr> <tr><td<strong>Email:</td<strong><td>'.$email.'</td></tr> <tr><td<strong>Viesti:</td<strong><td>'.$message.'</td></tr> </table> </body> </html> '; $headers .='MIME-Version: 1.0' . "\r\n"; $headers .='Content-type: text/html; charset=utf-8' . "\r\n"; // Additional headers $headers .= 'From: sender '.$email.' ' . "\r\n"; // Mail it mail($to, $subject, $body, $headers); //done. redirect to thank-you page. header('Location: lehed/thx.php'); // Function to validate against any email injection attempts function IsInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } function filter($data) { $data = trim(htmlentities(strip_tags($data))); if (get_magic_quotes_gpc()) { $data = stripslashes($data); } return $data; } ?>
  8. I am trying to figure out how to include a picture in the mail I send in PHP, any help is welcome! Code: <?php if(!isset($_POST['submit'])) { //This page should not be accessed directly. Need to submit the form. echo "error; you need to submit the form!"; } $name = $_POST['cformname']; $email = $_POST['cformemail']; $message = $_POST['cformmessage']; //Validate first if(empty($name)||empty($email)) { echo "Name and email are mandatory!"; exit; } if(IsInjected($email)) { echo "Bad email value!"; exit; } $email_from = 'info@test.com'; $email_subject = "Message from homepage!"; $email_body = "New message from user: $name.\n". "name:$name\n". "email:$email\n". "message:$message\n". " '<img src="http://css-tricks.com/examples/WebsiteChangeRequestForm/images/wcrf-header.png" alt="Website Change Request" />';n". $to = "info@test.com";//<== update the email address $headers = "From: $email_from \r\n"; $headers .= "Reply-To: $email \r\n"; //Send the email! mail($to,$email_subject,$email_body,$headers); //done. redirect to thank-you page. header('Location: pages/thankyou.php'); // Function to validate against any email injection attempts function IsInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } function filter($data) { $data = trim(htmlentities(strip_tags($data))); if (get_magic_quotes_gpc()) { $data = stripslashes($data); } return $data; } ?>
  9. The html loads at localhost, structure is same 100%. The page itself loads put no pics or info, just text: Empty
  10. Its a page 'Downloads'. Works great at localhost but doesnt show up @ web hosting. <?php define('IN_PHPBB', true); $page = !isset($_GET["page"]) ? "None" : $_GET['page']; $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup(); page_header('Downloads'); if(strcmp($page,"org") == 0) { $template->set_filenames(array('body' => 'download/org.html',)); } else if(strcmp($page,"audi") == 0) { $template->set_filenames(array('body' => 'download/audi.html',)); } else if(strcmp($page,"bmw") == 0) { $template->set_filenames(array('body' => 'download/bmw.html',)); } else if(strcmp($page,"vw") == 0) { $template->set_filenames(array('body' => 'download/vw.html',)); } else if(strcmp($page,"nissan") == 0) { $template->set_filenames(array('body' => 'download/nissan.html',)); } else if(strcmp($page,"opel") == 0) { $template->set_filenames(array('body' => 'download/opel.html',)); } else if(strcmp($page,"ford") == 0) { $template->set_filenames(array('body' => 'download/ford.html',)); } else if(strcmp($page,"chevrolet") == 0) { $template->set_filenames(array('body' => 'download/chevrolet.html',)); } else if(strcmp($page,"other") == 0) { $template->set_filenames(array('body' => 'download/other.html',)); } else { $template->set_filenames(array('body' => 'download/org.html',)); } make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx")); page_footer(); ?> and the html: <table class="tablebg" cellspacing="1" width="100%"> <tr> <th>BMW</th> </tr> <tr class="row1"> <td align="center" style="padding:5px 5px 5px 5px;"> <center> <hr width="60%" size="3" /> <table width="70%"> <tr> <td width="10%"><a href="http://www.upload.ee/image/1626514/325i_2.jpg" target = "_blank"> <img src="http://www.upload.ee/thumb/1626514/325i_2.jpg" border="0"/></a> <a href="http://www.upload.ee/image/1626518/325i_3.jpg"> <img src="http://www.upload.ee/thumb/1626518/325i_3.jpg" border="0"/></a> <td width="0%"><a href="http://www.upload.ee/image/1626519/325i_1.jpg" target = "_blank"> <img src="http://www.upload.ee/thumb/1626519/325i_1.jpg" border="0"/></a> <a href="http://www.upload.ee/image/1626521/325i_4.jpg" target = "_blank"> <img src="http://www.upload.ee/thumb/1626521/325i_4.jpg" border="0"/></a></td></td> <td><b><font color="white">Name:</font></b> 1996 BMW 325i e36 Convertible</br> <b><font color="white">Original Author:</font></b> ikey07</br> <b><font color="white">Size:</font></b> 3.89MB</br></br> <b><font color="white">Description:</font></b></br> Tunable in WAA</br> 2 Body kits included</br> 1. BMW M e36 series + Hood Vents</br> 2. BMW M e46 series + Masked Lights</br> New 2 M series wheels e36/e46</br> Realistic heavy damaged model</br> Model accuracy as real car 96%</br> Openable petrolcap</br> If you replace this car as BF Injection, the front fan is working ( spining )</br></br> <a href="http://ikey07.c-rp.net/viewtopic.php?f=6&t=2"><b><font color="white">Comments</font></b></a></br> </br> <ul id="nav"> <a class="downl" href="http://ikey07.c-rp.net/download/1996_BMW_325i_e36.rar" title="Download"><span>{L_DOWN}</span></a> </div> </br> </td> </tr> </table> <hr width="60%" size="3" /> </center> </td> </tr> </table> <br />
  11. I am sure this is a simple fix and I am total beginner but thanks to these forums learn alot Here is the code: http://$host/forgot.php?doReset=Reset&VeriCode=$new_code And when I click the link in email I get the following error The requested URL /forgot.php?doReset=Reset&VeriCode=60dea138b76c71acccfe34d4fab3e004 was not found on this server. If someone needs the full code to help, please PM me.
  12. How could I implement strcasecmp? function checkPwd($x,$y) { //Checks if strings are empty if(empty($x) || empty($y) ) { //Strings were empty return false; } else if(strlen($x) < 4 || strlen($y) < 4) { //String length too short return false; } else if(strcasecmp($x,$y) != 0) { //Strings do not match return false; } else { //Password Determined valid return true; } } This does not work, if the MD5 is uppercase, it says incorrect PW.
  13. Okay, I didnt explain myself good enough. The password encryption from application is uppercase. I suppose the problem is within application, not the code. Example. md5 Encryption for 'hi' is: 49f68a5c8493ec2c0bf489821c21fc3b and from our application it comes as: 49F68A5C849EC2C0BF489821C21FC3B So there comes the problem, php does not think its the same PW. P.S Sorry for saying it was PW not the encryption itself
×
×
  • 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.