Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. You can set up a cgi to transform the image to jpg, and pass it back to your php page, and work with it that way.
  2. I am having problems, can someone help me with this again. I have had a few problems, but reduced them to one, impassable one. At first I was having overall troubles, but after a lot of work, and a mini tutorial, I set up a developer account(a paypal sandbox test account setup), and created 2 email addressses on there for testing the ipn.  I tested it, and after some work I was able to create a developer account(overall account setup), and then 2 test emails for it.  One was testrecieve, and one was testpay.  The test recieve is recieving the payment, and the testpay, is sending the payment.  I tested it, and the payments were going greate, but it's simply ignoring my call to the ipn, and it's not sending me the email like it's suppose to, so it's totally ignoring it. The problem now is that I can't get it to just read the ipn. I just want it(for now), to email me, so I know it's working.  Here is my coding for the form, and the ipn set.  [code]<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="business" value="testrecieve@paypaldev.com" /> <input type="hidden" name="item_name" value="Payment Option 1" /> <input type="hidden" name="item_number" value="1" /> <input type="hidden" name="amount" value="0.01" /> <input type="hidden" name="no_shipping" value="1" /> <input type="hidden" name="no_note" value="1" /> <input type="hidden" name="currency_code" value="USD" /> <input type="hidden" name="bn" value="PP-BuyNowBF" /> <input type="hidden" name="return" value="http://www.hasbadservice.com/thankyou.php" /> <input type="hidden" name="cancel_return" value="http://www.hasbadservioce.com/cancelpayment.php" /> <input type="hidden" name="notify_url" value="http://www.hasbadservice.com/ipn.com" /> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>[/code] ipn page. [code]<?php // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; mysql_connect("localhost", "#####", "#####"); mysql_select_db("hasbadse_hbservice"); mail("businessman332211@hotmail.com", "successful", "Message goes here"); if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // check the payment_status is Completed // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email // check that payment_amount/payment_currency are correct // process payment } else if (strcmp ($res, "INVALID") == 0) { // log for manual investigation } } fclose ($fp); } ?>[/code]
  3. Do you  mean have more details for each and every project.  You just have to make each project a link, or have beside a show more details link, but you still have to work up the details pages, so they can see the details.
  4. Ah, very helpful, the wordwrap, mixed with the pre tags worked perfectly, thanks.
  5. Good idea, but that just made it go haywire. It killed the layout, wait, let me try wrapping that and then doing that, thanks, let me try that now.
  6. I know it's in the php faq, but I have tried everything. getting information from a text field, databasing it, and redisplaying it with the proper spacing. I tried doing the nl2br before database, after database, on display. I didn't fully understand what he meant in the faq?
  7. technically no, you can put an include anywhere.  If there is data above it, it's passed into the include.  An include isnothing but a reference.  The php engine looks at the include statement, finds the file it's pointing to, and just puts it straight into the page. That's it, if you set a variable before the include, and in the include try to reference it, it works just the same.
  8. I told you show the entire page, if I am still ona nd helping people when it's on, I will try and optimize it some for you.
  9. it would take you 10 minutes to build a table within a database it'll take you 5 minutes to program something to database, some form of identification for the orders, even if you just database there email address, and some other stuff.  What would take taht long.  10-20 minutes of extra work.THen you atleast have a list of emails of buyers, and you can match that against your emails to make sure your getting them all.  It would only take you 5 minutes create 1 table called userinfo 1 field called id - int(30) autoinc, prim email - varchar - 200 that's it then in the script take the email address and insert it into the table $insert = "INSERT INTO userinfo (email) VALUES ('$email');"; mysql_query($insert); that's it in it's basic form you can build onto it from there, you can triplet he functionality in less that 30 minutes, that took 2 seconds.
  10. [code]<input name="submit" type="Submit" onclick="MM_validateForm('email','','RisEmail');return document.MM_returnValue" value="Enter information" />     </label></td>     <td>&nbsp;</td> <?php $Name=$_POST['name']; $Cname=$_POST['cname']; $Query=$_POST['Question']; $email=$_POST['email']; mysql_select_db($database_csc, $csc); $query_Recordset1 = "SELECT * FROM onlineform"; $Recordset1 = mysql_query($query_Recordset1, $csc) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); $query_Recordset1 or die( "Unable to select database"); $query = "INSERT INTO onlineform VALUES ('','$name','$Cname','$email','$Query')"; if (mysql_query($query)) { echo "Thank you for signing up"; // or whatever other message in between the quotes }else { echo "I apologize there was a problem with signup"; // or whatever message here } mysql_close(); ?>[/code]
  11. Ok, currently I am rewriting content, but I can't start on my actual site yet. I am working on 3 concurrent projects, and 2 of them I am already falling behind on. Once I open up some time, I am taking about a week or 2 to start on the design, and layout.  I was just getting ideas from him, I will still be coding/programming/content writing. I will actually eventually be doing my own graphic design work, I was going to wait on the entire design, but thanks to koolaid man's help maybe I can get it up and running, then I can go ahead and finish my studying on those, and redo it in about 6 months to a year, but it can be something worth looking at until then at least.
  12. SELECT datetime, ident, ip, what, url FROM log WHERE ident = '$username' and datetime between '$begindate 00:00:00' and '$enddate 23:59:59' Why do you have the dates there 2 times It has the date, then a number it's better to store all that in a variable and pass it, it's quicker. What you are trying to do is called script optimization Optimize your script, remove useless code, double code, code that redoes it self If you have 150 lines of code, chances are if you try, it could be reduced to 100 lines of code post all of your code, on the slow page. Let me see if I can optimize it for you some.
  13. Well I am actually a lot closer than I was, I rewrote almost all the content on the site, and he is helping me with logo, and layout.  I might finally be on my way to something. I will redo everything in about 9 months or a year, after i know how to do some of the graphic elements, but until then, all of this is going to help business a lot. I am not sure, I can't say I am, but I am also considering chaning to something else as suggested, I am not 100% sure yet, it was suggested a few times, maybe freelance, web developer, or something, I might keep the one I have, but I am not sure yet.
  14. I would have said, but in another post obsidian told me it's best not to post how much someone is getting paid. Koolaidman is doing it as a favor, and I greatly appreciate it, I will make sure I make it up to him.
  15. [quote]not even just the logo. the whole "feel" of the site. on another note, for the last 2 days youve got another chap doing logos whilst your site remains the same. 2 days = 20 hours = lots of cash. why not put some of these posts into practice whilst you let the other chap worry about your logos?[/quote] No comment [quote]http://btcartoons.com/rt/6.png http://btcartoons.com/rt/7.png http://btcartoons.com/rt/8.png[/quote] I will email you in a minute, I like all of those too.
  16. background:url(<?php root ?>/includes/teal.gif) repeat-x; Short hand isn't safe use <?php echo $root; ?> if that's what you are trying to do, and he's right you didn't try passing the header. It looks like your using some form of templating system.  It iwll probably work once you pass it that header, it won't work if you don't, that tells the browser that it's a css file.  It also has to be valid css, that hte php outputs.
  17. You mean use something like that logo. I am getting the idea of simple, just looking for a sliding scale. I know some people go extravagant, and it works, some people go ismple it works, I am trying to get an idea, of how to keep everythin gin the middle.
  18. This is probably what I should ask instead of avoiding it.  How should I gauge it.  I know someone did that logo for me, and I have him doing other work for me, after I get organized, but I am still leanring enough to do layouts, logo'sand stuff like that, he did that logo, and I liked it. As far as simple difficult.  What should I use as a guideline to determine simple. Like with text, so you mean stuff like maybe FB, or making the F, and b a wierd font then having reelance, and usinessman after those. WOuld simple have anything to do with filters. Or things like associating simple,basic pictures, with your name, or something similar.
  19. SELECT datetime, ident, ip, what, url FROM log WHERE ident = '$username' and datetime between '$begindate 00:00:00' and '$enddate 23:59:59'
  20. [code]<?php //Connect To Database $hostname="mysqladmin2.secureserver.net:43998"; $username="091381"; $password="(mypassword"; $dbname="091381"; $usertable="users"; $yourfield = "uderid"; mysql_connect($hostname,$username, $password); mysql_select_db($dbname); echo mysql_error(); $query = "SELECT * FROM $usertable"; $result = mysql_query($query); if($result) { // stuff here } ?> [/code] try that, just with stuff here put your other stuff. Also double check your password, double check your username, replace that connection address with "localhost" and see if that works. If none of that works, then what is the url of your web hosting company.
  21. [code]<?php //validate email // setup errorhandler $errorhandler = ""; // setup email check $regexemail = "^[A-Za-z0-9\._-]+@([A-Za-z0-9][A-Za-z0-9-]{1,62})(\.[A-Za-z][A-Za-z0-9-]{1,62})+$"; // validation on email if ($_POST['email'] == "") { $errorhandler .= "Email was left blank"; } if (!ereg("$regexemail", $email)) { $errorhandler .= "The email address is improperly formatted<br />"; } if(!(getmxrr(substr(strstr($email, '@'), 1), $temp)) || checkdnsrr(gethostbyname(substr(strstr($email, '@'), 1)), "ANY")) { $errorhandler .= "The Domain name for the email address does not exist<br />"; } if ($errorhandler != "") { echo "<span style=\"color:red;\">"; echo $errorhandler; echo "</span>"; } if ($errorhandler == "") { $var = mysql_real_escape_string($_POST['email']); $len = strlen($var); if ($len >0) { $query = "INSERT INTO onlineform VALUES ('','$name','$Cname','$email','$Query')"; mysql_query($query); mysql_close();   } } ?>[/code] That will checl 1. if the email is blank 2. if it's formatted correctly 3. if it's dns(domain name), is real or not(not 100% accurate, but effective nonetheless));
  22. [code]<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="business" value="testrecieve@paypaldev.com" /> <input type="hidden" name="item_name" value="Payment Option 1" /> <input type="hidden" name="item_number" value="1" /> <input type="hidden" name="amount" value="0.01" /> <input type="hidden" name="no_shipping" value="1" /> <input type="hidden" name="no_note" value="1" /> <input type="hidden" name="currency_code" value="USD" /> <input type="hidden" name="bn" value="PP-BuyNowBF" /> <input type="hidden" name="return" value="http://www.hasbadservice.com/thankyou.php" /> <input type="hidden" name="cancel_return" value="http://www.hasbadservioce.com/cancelpayment.php" /> <input type="hidden" name="notify_url" value="http://www.hasbadservice.com/ipn.com" /> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but02.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>[/code] That fixed that problem, it's starting to work now, but it's not doing what I need in the ipn, I am just testing it out to see if it'll email me, but for now, I changed paypal address to sandbox, and it's not working here it is. [code]<?php // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.sandbox.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; mysql_connect("localhost", "#####", "####"); mysql_select_db("hasbadse_hbservice"); mail("businessman332211@hotmail.com", "successful", "Message goes here"); if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // check the payment_status is Completed // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email // check that payment_amount/payment_currency are correct // process payment } else if (strcmp ($res, "INVALID") == 0) { // log for manual investigation } } fclose ($fp); } ?>[/code] I don't get it.  There is probably something simple, it is however successfully doing the full payment process, I have just to get it to test the ipn for me.
  23. If you trust me. Email me your ftp information, I will take a few minutes to find it and fix it for you, but it has to be within the next 45 minutes, I am stopping work here soon, if the ftp works, I can look around see if I can find out what's causing it, that's all I can do.
  24. http://www.btcartoons.com/rt/1.png I loved this one, he did it for me, what do you think ?? of this logo, I had someone on the forums do it for me, and I liked this one a lot.
×
×
  • 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.