Jump to content

john.grisum

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by john.grisum

  1. Just an update. I have used a VB script via excel to undergo a search for the content in A# and display the number of hits in B#. It actually works quite well. The code is below if anyone wants to use it. Example output: [A1] "PRD-12345-123" [B1] 708 Hits Public Sub ExcelGoogleSearch()Dim searchWords As StringWith Sheets("Sheet1")RowCount = 1Do While .Range("A" & RowCount) <> ""searchWords = .Range("A" & RowCount).Value' Get keywords and validate by adding + for spaces betweensearchWords = Replace$(searchWords, " ", "+")' Obtain the source code for the Google-searchterm webpagesearch_url = "http://www.google.com/search?hl=en&q=" & searchWords & "&meta="""Set search_http = CreateObject("MSXML2.XMLHTTP")search_http.Open "GET", search_url, Falsesearch_http.sendresults_var = search_http.responsetextSet search_http = Nothing' Find the number of results and post to sheetpos_1 = InStr(1, results_var, "resultStats>", vbTextCompare)pos_2 = InStr(3 + pos_1, results_var, ">", vbTextCompare)pos_3 = InStr(pos_2, results_var, "<nobr>", vbTextCompare)NumberofResults = Mid(results_var, 1 + pos_2, (-1 + pos_3 - pos_2))Range("B" & RowCount) = NumberofResultsRowCount = RowCount + 1LoopEnd WithEnd Sub
  2. Ive slimmed down to the PRD & # of hits columns. This makes it much easier for me to focus on which PRDs are good and which are not.
  3. I have a little side project that I need to complete and would like some input. I have a list of about 3,000 excel entries that i need to find their matching sibling (I currenlty have over 11,000). I have included examples below where the MEP has a sibling PRD. MEP-04103-001 PRD-49028-005MEP-04103-001 PRD-49028-006MEP-04103-001 PRD-49028-007MEP-04103-001 PRD-49028-010MEP-04103-001 PRD-49028-011 I have several thousand PRD numbers that do not have their sibling MEP numbers and would need to search the web for such a match. I have been doing this manually but I will have several hundred to do each month and it will become quite tedious. I have been doing manual web searches by using this format: "PRD-09854-019" NEAR "MEP-*****-***". What I need is to be able to create an excel or similar document to include web searches for the PRD and include perhaps the top 5 results' description section and web link. Any ideas would be greatly appreciated.
  4. We have a server set up with Cpanel (phpmyadmin, mysql, etc). We are starting from scratch. I guess the best process layout would be a php contact form > php script > sql database > some sort of managment/GUI/API tool. We cant seem to find any example of a form, php to sql script, or management/GUI/API tools.
  5. I have actually revisted the problem. I need to start off with a form (contact form, etc) that is able to submit to a server hosted SQL database. Something nice and simple (secure, etc). The secondary aspect is to have an administration type program (or API) to manage the submitted information. Im used to using existing databases with SQL Server Management Studio, but I dont really know where to start in regards to mysql stuff. Some inspiration would be greatly appreciated! P.S.: With 1300 views I think other people are interested also.
  6. How would a website like this process requests/ emails? Any speculation as to the use of third party applications? Perhaps email2db?
  7. I would like to know, speculatively, what type of backend (programs, etc) that this website might be using to automatically process its orders and manage its website/program interaction. I am thinking of creating something similar but do not have any idea on where to start. http://unlockwholesale.com/ubusUsername: qwertytodd89@yahoo.caPassword: qwertytodd
  8. I need to create a PHP contact form that submits to a hosted SQL database that a program called email2db is able to download and process/parse into automated messages.The programming/tools need to be rather complete as my knowledge of code is rather limited. I have looked into a great many places and have not found many complete solutions that are applicable to my situation (ex: most require a subscription service, which is unacceptable.). A straight database pull is used so nothing fancy is required. If anyone has any ideas or suggestions that would be great.
  9. The list is static. The current form can be viewed here: www.freemyblackberry.com/freecodeFor the free code request form there are only certain carriers in certain countries. Also certain carriers only have certain models.So, when someone selects Canada, a list of Canadian carriers come up, and when lets say Telus is selected only model numbers for that carrier show up.
  10. Newb Question: I need to create a form with multiple fields that are dependent on the selection in the previous field. The second field is dependent on the first selection, and the third on the second, etc.Ex:Field one: Selectable: option 1, option 2.Field two: Selectable: If option 1 selected then red and blue are selectable, If option 2 selected then green and purple are selectable. Do I need PHP and SQL programming? Are there any tutorials/applications for my specific case?
  11. Thank you very much for your responses. The code seems to work. I will also keep in mind changing the eregi to preg match. If you ever need to unlock a Blackberry my website does it for free: www.freemyblackberry.com
  12. The trim exists elsewhere... All I need to know is if the previously stated is complete in of itself and would not cause issues. Nothing should be changed other than the 15 limiter as there is an extensive amount of other code that will cause issues if anything other than this is changed.
  13. This has seems to have worked. Is it correct?
  14. I have been toying around with a field on one of my forms (strlen, etc). I have a field that requires exactly 15 digits. I have used the below code but am not sure how I should go about creating a limit of 15 numbers/digits for the field. I have tried looking at stringlengths (strlen($exp, $value) = 15) and such but have not been able to prevent errors.validation.js validation.php
  15. Why this thread is pretty much dead! Lets start it up again!Site Name: Free My BlackberrySite Description: Offers FREE Unlock Codes for GSM Blackberry phones.Site Owner/Developer: me/ some helpersSite Address: Freemyblackberry.comExtra Comments: Good? YES/NO. Suggestions... Comments?Any suggestions on decreasing load times?
  16. I already have a validation file (below)... The problem is that when the person does not enter 15 digits it forwards to a new webpage...
  17. This is actually the fourth form I have tried to recode to use on my website. All the previous ones did not have the functions I needed. I have already lost patience in trying to just get this specific form working (well except for this one issue). I am sure though that there are just two or three lines that need to be changed/added and my lack of specific experience dictates that I do not know where to start with this specific issue. A specific question needs a specific answer... Telling me to look for a validation script is not specific enough. I have already looked at such information and have not found anything applicable, otherwise I would not be here. Well, I guess I'm stuck with what I have.
  18. Do you have an example of such a script?
  19. I have finally got my form working but wish to change one feature to make it perfect. I am not 100% sure on how to do it properly. When the form is submitted with an incorrect amount of digits in the "IMEI" field (it requires 15 characters), another page opens with "Sorry, but there was an error found with the form you submitted....Please press the back button on your browser and fix this error." This is expected. I wish for the error to be a prompt on the same page when the person does not enter exactly 15 numerical digits. Is there something that I can add to the "required.add" (this would be ideal as it would make the prompt occur on the same page)? The test form is located at the bottom of the page here: http://freemyblackberry.com/freecode2.htmlHTML PHP FORM
  20. Tried that...Im getting "This message is for the Webmaster. Please enter your email address into the file 'lite_settings.php'" after placing the } for the function (even though the email address is there).The Lite_settings.php (below).
  21. Okay, I got the function } issue (see above), but I'm not sure where the other "if statement" } goes. Thanks.
  22. Update: The error has been fixed.Website (test section): http://freemyblackberry.com/freecode2.htmllite_settings.php (below): freecode.html (below)
  23. PHP--------------------------------------------------------------------------------------------------<?phpif(isset($_POST['email'])) { // EDIT THE 2 LINES BELOW AS REQUIRED $email_to = "hidden"; $email_subject = "Unlock Code Request: ".$_POST['email']; function died($error) { // your error code can go here echo "We are very sorry, but there were error(s) found with the form you submitted."; echo "These errors appear below.<br /><br />"; echo $error."<br /><br />"; die(); } // validation expected data exists if(!isset($_POST['email']) || !isset($_POST['imei']) || !isset($_POST['model']) || !isset($_POST['carrier']) || !isset($_POST['mep']) || !isset($_POST['country'])) { died('We are sorry, but there appears to be a problem with the form you submitted.'); } $email_from = $_POST['email']; // required $imei = $_POST['imei']; // required $model = $_POST['model']; // required $carrier = $_POST['carrier']; // not required $mep = $_POST['mep']; // not required $country = $_POST['country']; // required $error_message = ""; $email_exp = "^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$"; if(!eregi($email_exp,$email_from)) { $error_message .= 'The Email Address you entered does not appear to be valid.<br />'; } $string_exp = "^[0-9._%-]+$"; if(!eregi($string_exp,$imei)) { $error_message .= 'Please enter only 15 digits for the IMEI. Do not include periods, spaces, or dashes.<br />'; } if(strlen($carrier) < 2) { $error_message .= 'Please enter a valid carrier name. For example: T-Mobile, Telus, Rogers, etc.<br />'; } if(strlen($model) < 2) { $error_message .= 'Please enter a valid model name. For example: 9700, 9520, etc.<br />'; } if(strlen($country) < 2) { $error_message .= 'Please enter a valid country name.<br />'; } if(strlen($error_message) > 0) { died($error_message); } $email_message = "abc\n\n"; function clean_string($string) { $bad = array("content-type","bcc:","to:","cc:","href"); return str_replace($bad,"",$string); } $email_message .= "email: ".clean_string($email_from)."\n"; $email_message .= "imei: ".clean_string($imei)."\n"; $email_message .= "model: ".clean_string($model)."\n"; $email_message .= "carrier: ".clean_string($carrier)."\n"; $email_message .= "mep: ".clean_string($mep)."\n"; $email_message .= "country: ".clean_string($country)."\n"; // create email headers$headers = 'From: '.$email_from."\r\n".'Reply-To: '.$email_from."\r\n" .'X-Mailer: PHP/' . phpversion();@mail($email_to, $email_subject, $email_message, $headers); ?> <!-- include your own success html here --> Thank you for contacthjkhjkhjkhjhks. We will be in touch with you very soon. <?}?>\\HTML----------------------------------------------------------------------------------------------------------------....<link href="style.css" rel="stylesheet" type="text/css" /><script type="text/javascript" src="js/jquery-1.3.2.min.js"></script><script type="text/javascript">// <![CDATA[jQuery(document).ready(function(){ $('#contactform').submit(function(){ var action = $(this).attr('action'); $.post(action, { email: $('#email').val(), imei: $('#imei').val(), model: $('#model').val(), carrier: $('#carrier').val(), mep: $('#mep').val(), country: $('#country').val() }, function(data){ $('#contactform #submit').attr('disabled',''); $('.response').remove(); $('#contactform').before('<p class="response">'+data+'</p>'); $('.response').slideDown(); if(data=='Unlock Code Request Sent!') $('#contactform').slideUp(); } ); return false; });});// ]]></script>........<form name="contactform" id="contactform" method="post" action="send_form_email.php"><table width="600px"></tr><tr> <td valign="top"> <label for="email">Email Address <span class="red">*</span> </label> </td> <td valign="top"> <input id="email" name="email" type="text" class="text" maxlength="100" value="Example: person@yahoo.com" onfocus='this.value="";this.onfocus="";' size="50"> </td></tr> <tr> <td valign="top""> <label2 for="imei">IMEI Number <span class="red">* <br>(No periods, spaces, or dashes)</span> </label> </td> <td valign="top"> <input id="imei" name="imei" type="text" class="text" maxlength="30" value="Example: 123456789012345" onfocus='this.value="";this.onfocus="";' size="50"> </td></tr><tr> <td valign="top"> <label2 for="model">Blackberry Model Number <span class="red">*</span></label> </td> <td valign="top"> <input id="model" name="model" type="text" class="text" maxlength="35" value="Example: 9700" onfocus='this.value="";this.onfocus="";' size="50"> </td></tr><tr> <td valign="top"> <label2 for="carrier">Original Carrier/Network <span class="red">*</span> </label> </td> <td valign="top"> <input id="carrier" name="carrier" type="text" class="text" maxlength="35" value="Example: Rogers" onfocus='this.value="";this.onfocus="";' size="50"> </td></tr><tr> <td valign="top"> <label2 for="mep">MEP Number <br>(<a href="mepcode.html"><span><strong> What is my MEP number?</span></strong></a>) </label> </td> <td valign="top"> <input id="mep" name="mep" type="text" class="text" maxlength="35" value="Example: MEP-09292-093" onfocus='this.value="";this.onfocus="";' size="50"> </td></tr> <tr> <td valign="top"> <label2 for="country">Country <span class="red">*</span></label> </td> <td valign="top"> <input id="country" name="country" type="text" class="text" maxlength="35" value="Example: Canada" onfocus='this.value="";this.onfocus="";' size="50"> </td></tr><tr> <td colspan="2" style="text-align:right"> <br> <input type="image" name="imageField" id="imageField" src="images/send.gif" class="submit" > </td></tr> </table></form>.....
  24. Okay. Ive got them to appear on the same page but another problem has occurred. When complete the form does not "roll up" anymore. :)Possibly a formatting error. Code below. Important areas bolded.I have played aroung with pasting this code in many places to try and make it work: if(@mail($your_email,$email_subject,$email_content)) { echo 'Unlock Code Request Sent!'; }
×
×
  • Create New...