1. PHP and PayPal IPN (x-posted)

    Date: 06/11/05 (Web Development)    Keywords: php, web

    You'll have to excuse my relative noobishness. I'm not great at PHP, but unfortunately I have a job to do.

    Has anyone used PHP do do something with PayPal's Instant Payment Notification? I have to run a script that sends different messages to the buyer based on what product they buy. I have a script (mostly copied from PayPalDev, but I'd say I pretty much know what it's doing) that gets the variables from $_POST with fsockopen(). The script already redefines these array variables (i.e., what you would do if register_globals were off), and they seem like they're all there since it sends me mail when $payer_email is used with mail(). The problem I have is that $item_number prints blank every time.



    //set variables needed for email.

    $from = "wegottatalkbaby@optonline.net";

    $subject = "Responsible Choices Publishing Co. - File Location and Password";

    $msg_02 = "second message";

    $msg_03 = "third message";

    $msg_04 = "fourth message";



    // 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.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'];
    $payment_date = $_POST['payment_date'];
    $first_name = $_POST['first_name'];
    $last_name = $_POST['last_name'];
    $payment_type = $_POST['payment_type'];
    $payment_status = $_POST['payment_status'];
    $payment_gross = $_POST['payment_gross'];
    $payment_fee = $_POST['payment_fee'];
    $settle_amount = $_POST['settle_amount'];
    $memo = $_POST['memo'];
    $payer_email = $_POST['payer_email'];
    $receiver_email = $_POST['receiver_email'];
    $txn_id = $_POST['txn_id'];
    $txn_type = $_POST['txn_type'];
    $payer_status = $_POST['payer_status'];
    $address_street = $_POST['address_street'];
    $address_city = $_POST['address_city'];
    $address_state = $_POST['address_state'];
    $address_zip = $_POST['address_zip'];
    $address_country = $_POST['address_country'];
    $address_status = $_POST['address_status'];
    $item_name = $_POST['item_name'];
    $item_number = $_POST['item_number'];
    $tax = $_POST['tax'];
    $option_name1 = $_POST['option_name1'];
    $option_selection1 = $_POST['option_selection1'];
    $option_name2 = $_POST['option_name2'];
    $option_selection2 = $_POST['option_selection2'];
    $for_auction = $_POST['for_auction'];
    $invoice = $_POST['invoice'];
    $subscr_id = $_POST['subscr_id'];

    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

    // if 'VERIFIED', send email

    if ($item_number == 'RCP1101')
    {mail($payer_email, $subject, "You ordered the book", "From: $from");}

    else if ($item_number == 'RCP1102')
    {mail($payer_email, $subject, $msg_02, "From: $from");}

    else if ($item_number == 'RCP1103')
    {mail($payer_email, $subject, $msg_03, "From: $from");}

    else if ($item_number == 'RCP1104')
    {mail($payer_email, $subject, $msg_04, "From: $from");}

    else
    {mail("remix.sakura@gmail.com", "Not sent", "You ordered item $item_number", "From: $from");}

    }

    else if (strcmp ($res, "INVALID") == 0) {
    // log for manual investigation


    }
    }
    fclose ($fp);
    }





    I've tried a number of things, and now I'm up against a deadline. So I am humbly grateful for assistance from better programmers.

    Source: http://www.livejournal.com/community/webdev/209874.html

  2. Can you hide your personal information on the web?

    Date: 06/11/05 (Web Development)    Keywords: security, web

    A client was surprised that I could legally find out a lot of personal information about him on the web. Without paying a penny, I found his address, phone number and even his age. In fact if I wanted his financial profile and any legal information trail on him, I could get that too easily (however it might cost me a small fee)

    He asked me if there is anyway to legally stop people from looking up such personal information? After researching this, I saw that there were very few options here. These are the conclusions I found that are legal.

    1. You can get a court or executive order to seal your records. Even if this could somehow be justified, it still wouldn't stop past leaks. Usually this can only be justified under an extreme situation, and the odds of even a clever lawyer getting this done are probably against it. Usually this can only be justified if it can be shown that your very life depends on blocking future leaks. Even if this is done, it's not at all foolproof.
    2. Even the director of the FBI can't stop his information from spreading on the web. It's just in too many places and there seems to be no way to block them all.
    3. You can legally change your identity. You can even legally create a second identity with a second Social Security number and separate drivers license. This still doesn't stop past leaks. Eventually a information trail will exist on your new identity though. To effectively hide, you'd have to change your identity, move, and change all your contact information (because you can be traced through contact information). There would still be a legal records linking your aliases though and it would still be possible to trace a person through them. This would still not stop past leaks on your old identity.

    So the short answer is, if a person is determined to find a lot of information about you, there is nothing you can do about.

    Read Comments
    Add a Comment

    Source: http://www.livejournal.com/community/webdev/209656.html

  3. PHP and PayPal IPN (x-posted)

    Date: 06/11/05 (PHP Development)    Keywords: php, web

    You'll have to excuse my relative noobishness. I'm not great at PHP, but unfortunately I have a job to do.

    Has anyone used PHP do do something with PayPal's Instant Payment Notification? I have to run a script that sends different messages to the buyer based on what product they buy. I have a script (mostly copied from PayPalDev, but I'd say I pretty much know what it's doing) that gets the variables from $_POST with fsockopen(). The script already redefines these array variables (i.e., what you would do if register_globals were off), and they seem like they're all there since it sends me mail when $payer_email is used with mail(). The problem I have is that $item_number prints blank every time.



    //set variables needed for email.

    $from = "wegottatalkbaby@optonline.net";

    $subject = "Responsible Choices Publishing Co. - File Location and Password";

    $msg_02 = "second message";

    $msg_03 = "third message";

    $msg_04 = "fourth message";



    // 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.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'];
    $payment_date = $_POST['payment_date'];
    $first_name = $_POST['first_name'];
    $last_name = $_POST['last_name'];
    $payment_type = $_POST['payment_type'];
    $payment_status = $_POST['payment_status'];
    $payment_gross = $_POST['payment_gross'];
    $payment_fee = $_POST['payment_fee'];
    $settle_amount = $_POST['settle_amount'];
    $memo = $_POST['memo'];
    $payer_email = $_POST['payer_email'];
    $receiver_email = $_POST['receiver_email'];
    $txn_id = $_POST['txn_id'];
    $txn_type = $_POST['txn_type'];
    $payer_status = $_POST['payer_status'];
    $address_street = $_POST['address_street'];
    $address_city = $_POST['address_city'];
    $address_state = $_POST['address_state'];
    $address_zip = $_POST['address_zip'];
    $address_country = $_POST['address_country'];
    $address_status = $_POST['address_status'];
    $item_name = $_POST['item_name'];
    $item_number = $_POST['item_number'];
    $tax = $_POST['tax'];
    $option_name1 = $_POST['option_name1'];
    $option_selection1 = $_POST['option_selection1'];
    $option_name2 = $_POST['option_name2'];
    $option_selection2 = $_POST['option_selection2'];
    $for_auction = $_POST['for_auction'];
    $invoice = $_POST['invoice'];
    $subscr_id = $_POST['subscr_id'];

    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

    // if 'VERIFIED', send email

    if ($item_number == 'RCP1101')
    {mail($payer_email, $subject, "You ordered the book", "From: $from");}

    else if ($item_number == 'RCP1102')
    {mail($payer_email, $subject, $msg_02, "From: $from");}

    else if ($item_number == 'RCP1103')
    {mail($payer_email, $subject, $msg_03, "From: $from");}

    else if ($item_number == 'RCP1104')
    {mail($payer_email, $subject, $msg_04, "From: $from");}

    else
    {mail("remix.sakura@gmail.com", "Not sent", "You ordered item $item_number", "From: $from");}

    }

    else if (strcmp ($res, "INVALID") == 0) {
    // log for manual investigation


    }
    }
    fclose ($fp);
    }





    I've tried a number of things, and now I'm up against a deadline. So I am humbly grateful for assistance from better programmers.

    Source: http://www.livejournal.com/community/php_dev/58444.html

  4. Asus CUBX-E Woes---

    Date: 06/11/05 (Computer Geeks)    Keywords: web

    PIII 733mhz cpu,
    ASUS CUBX-E Mobo,
    Creative 16bit Sound card,
    Generic Ethernet card,
    1x 64mb ram
    1x 128mb ram
    300w power supply
    Sony CDRW
    FDD

    And it doesn't boot. Fans spin up, cd rom and fdd lights flicker (searching for boot device?) but no system beeps and NO VIDEO. Tried swapping ram, nope. Tried different video cards: nothing. I'm having NO idea what's wrong. Asus Web site is here, but good luck getting it to load quickly.

    ANY help at all is greatly appreciated.

    Source: http://www.livejournal.com/community/computergeeks/706012.html

  5. odd

    Date: 06/11/05 (WebDesign)    Keywords: web, spam

    I've had an email which simply says:

    I was just wondering if this website is free?


    I'd reply and say "Yes", of course, but I'm worried it's an email harvesting spider/auto-responder. Never reply to spam emails.

    Anyone else had/seen this?

    Source: http://www.livejournal.com/community/webdesign/901389.html

  6. Imagemaps and onClick

    Date: 06/12/05 (WebDesign)    Keywords: html, java, web

    Hey Java guys and gals,

    I'm working on using an imagemap as a main navigation for my band's website. If you go to http://www.ericstevenslive.com and click on the HTML site button, you'll get to the mainpage which is simply one big image map.

    I'm trying to make the "News" button open the Band News page in a another window created by the function doNew1(). Here's the code:

    for my image map news area:


    onmouseover="window.status = '- Band News -'; return true"

    onmouseout="window.status = '- The Official Eric Stevens Website -'; return true" href="#">


    and for the script:

    function doNew1() {

    var myPic1 = ""

      if (myPic1.name == null) {

        myPic1 = window.open("newsshell.html","subwindow","width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=no,left=200,top=250,screenX=200,screenY=250")

      } else{

        myPic1.focus()

      }

    }


    The problem is that the window will not open when you click in the News area at all. I tried using the same onClick command with an image and a regular HREF and it seems to work fine.

    So, why is it not working in the imagemap, am I missing something?
    Please help, I have tried practically everything, thanks!

    -Matt

    xposted a coupla' places

    Source: http://www.livejournal.com/community/webdesign/901962.html

  7. Imagemaps and onClick

    Date: 06/12/05 (HTML Help)    Keywords: html, java, web

    Hey Java guys and gals,

    I'm working on using an imagemap as a main navigation for my band's website. If you go to http://www.ericstevenslive.com and click on the HTML site button, you'll get to the mainpage which is simply one big image map.

    I'm trying to make the "News" button open the Band News page in a another window created by the function doNew1(). Here's the code:

    for my image map news area:


    onmouseover="window.status = '- Band News -'; return true"

    onmouseout="window.status = '- The Official Eric Stevens Website -'; return true" href="#">


    and for the script:

    function doNew1() {

    var myPic1 = ""

      if (myPic1.name == null) {

        myPic1 = window.open("newsshell.html","subwindow","width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=no,left=200,top=250,screenX=200,screenY=250")

      } else{

        myPic1.focus()

      }

    }


    The problem is that the window will not open when you click in the News area at all. I tried using the same onClick command with an image and a regular HREF and it seems to work fine.

    So, why is it not working in the imagemap, am I missing something?
    Please help, I have tried practically everything, thanks!

    -Matt

    xposted a coupla' places

    Source: http://www.livejournal.com/community/htmlhelp/2015229.html

  8. Imagemaps and onClick

    Date: 06/12/05 (Javascript Community)    Keywords: html, java, web

    Hey Java guys and gals,

    I'm working on using an imagemap as a main navigation for my band's website. If you go to http://www.ericstevenslive.com and click on the HTML site button, you'll get to the mainpage which is simply one big image map.

    I'm trying to make the "News" button open the Band News page in a another window created by the function doNew1(). Here's the code:

    for my image map news area:


    onmouseover="window.status = '- Band News -'; return true"

    onmouseout="window.status = '- The Official Eric Stevens Website -'; return true" href="#">


    and for the script:

    function doNew1() {

    var myPic1 = ""

      if (myPic1.name == null) {

        myPic1 = window.open("newsshell.html","subwindow","width=600,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no, resizable=no,left=200,top=250,screenX=200,screenY=250")

      } else{

        myPic1.focus()

      }

    }


    The problem is that the window will not open when you click in the News area at all. I tried using the same onClick command with an image and a regular HREF and it seems to work fine.

    So, why is it not working in the imagemap, am I missing something?
    Please help, I have tried practically everything, thanks!

    -Matt

    Source: http://www.livejournal.com/community/javascript/69100.html

  9. Forced refresh??

    Date: 06/12/05 (WebDesign)    Keywords: java, web

    When I make changes or updates to my website, I've been noticing that I must refresh, or even hard-refresh the page before I can see the changes. I don't want visitors to the site to have to do this. Is there a way around it? Is there a javascript of some sort that would refresh for them?

    Thanks all! And I apologize for any x-posting.

    Source: http://www.livejournal.com/community/webdesign/902523.html

  10. Forced refresh??

    Date: 06/12/05 (Web Development)    Keywords: java, web

    When I make changes or updates to my website, I've been noticing that I must refresh, or even hard-refresh the page before I can see the changes. I don't want visitors to the site to have to do this. Is there a way around it? Is there a javascript of some sort that would refresh for them?

    Thanks all! And I apologize for any x-posting.

    Source: http://www.livejournal.com/community/webdev/210115.html

  11. New to FireFox....

    Date: 06/13/05 (Mozilla)    Keywords: browser, web, google

    I just installed Firefox today and everything seems okay but i have a few questions, maybe someone can help me out here.

    1. I use MSN Messenger and whenever i receive an e-mail on my Hotmail account i get a little pop up letting me know. When i click the pop up it takes me to my e-mail. The problem is that it opens/uses IE instead of Firefox. Is there anyway of making MSN open Firefox and not IE? I made Firefox my primary web browser if that helps any.

    2. Is Firefox compatible with Window Blinds?

    3. Firefox has a google search thing at the top and whenever i use it to search the search opens in the window/tab i am using, is there a way to make it open a new tab?


    Hope to get help soon. Thanks.

    T.

    Source: http://www.livejournal.com/community/mozilla/291620.html

  12. hybrid question...

    Date: 06/13/05 (Web Development)    Keywords: web

    i know this is a web dev community but anyone have any info on custom hybrid cd's??? I was able to burn the CD in toast and get it to work for PC and MAC...however, even with my autorun.inf file, the PC won't auto launch the .exe file. Any ideas???

    Thanks!!!

    Source: http://www.livejournal.com/community/webdev/210271.html

  13. Here is a challenge!

    Date: 06/13/05 (Web Development)    Keywords: css, java, web

    I have a table inside of a table.
    I want to make the two table columns line up.
    I have made all of my widths exactly the same.
    What can I do?

    See code here.

    See code without any styles here.

    See CSS here.

    x-posted to '[info]'webdesign and '[info]'webdev

    **Edit - the tables I'm trying to line up are the javascript dropdown nested table.

    Source: http://www.livejournal.com/community/webdev/210715.html

  14. Here is a challenge!

    Date: 06/13/05 (WebDesign)    Keywords: css, java, web

    I have a table inside of a table.
    I want to make the two table columns line up.
    I have made all of my widths exactly the same.
    What can I do?

    See code here.

    See code without any styles here.

    See CSS here.

    x-posted to '[info]'webdesign and '[info]'webdev

    **Edit - the tables I'm trying to line up are the javascript dropdown nested table.

    Source: http://www.livejournal.com/community/webdesign/903572.html

  15. Tables

    Date: 06/13/05 (WebDesign)    Keywords: web

    how do you make a table scroll? i'm trying to avoid iframes.. and i'm sure i've seen some websites that have a table that can scroll.

    i could just be making this up - but if it's possible, i want to know lol!
    if the above is possible, can you have a hyperlink be targeted to a table cell?

    thanks in advance.

    Source: http://www.livejournal.com/community/webdesign/903408.html

  16. I need some help

    Date: 06/14/05 (Web Hosts)    Keywords: html, web, hosting

    I'm building a website because I'm starting a small online business (I make jewelry and monsters).

    I need good bandwidth.
    I need enough space to store lots of photos (or a good, affordable, dependable photo hosting site)
    And preferrably some kind of thing to help me make order forms and the ability to have people pay with paypal.
    It can't be too expensive, cause I'm poor...That's why I'm starting the business.
    I know enough html, so I don't need a ton of programs to help me build the site, though I need to figure out the ordering thing.

    Suggestions for good places would be very much appreciated.

    Source: http://www.livejournal.com/community/webhosts/27932.html

  17. Google readying Web-only video search

    Date: 06/14/05 (Web Technology)    Keywords: web

    By this summer, search giant expected to launch service that will let people preview media clips from its Web site.

    Source: http://news.zdnet.com/Google+readying+Web-only+video+search/2100-9588_22-5745038.html?part=rss&tag=feed&subj=zdnn

  18. charging

    Date: 06/14/05 (WebDesign)    Keywords: html, web

    so, how much would you charge for a very basic html, lets say 5 page, website?

    Source: http://www.livejournal.com/community/webdesign/903781.html

  19. Setting up a database

    Date: 06/14/05 (PHP Community)    Keywords: php, web, hosting

    I have been asked to build a sales/order/customer/employee management system for my company. I am having a problem deciding how to set up the "sales/order" tables. The company sells domain registration, hosting, web design and on hold messaging. I cant store all the orders in one table called orders simply because all the different products have different information that needs to be stored but I am just not sure that 3 separate tables is the way to go.

    The website table would contain:
    order# | designer | start_date | completion_date | salesman | customer# | sales_date

    The hosting table would contain:
    order# | domain_name | start_date | location | salesman | customer# | sales_date

    The domain table would contain:
    order# | domain_name | start_date | salesman | customer# | sales_date

    Should I have one table called orders that contains the common columns like salesman, customer# and sales_date and then use the order# to get the information from appropriate table? The company will probably add more products in the future.

    Any advice would be appreciated.

    cross posted in PHP and webdev

    Source: http://www.livejournal.com/community/php/306616.html

  20. Setting up a database

    Date: 06/14/05 (Web Development)    Keywords: php, web, hosting

    I have been asked to build a sales/order/customer/employee management system for my company. I am having a problem deciding how to set up the "sales/order" tables. The company sells domain registration, hosting, web design and on hold messaging. I cant store all the orders in one table called orders simply because all the different products have different information that needs to be stored but I am just not sure that 3 separate tables is the way to go.

    The website table would contain:
    order# | designer | start_date | completion_date | salesman | customer# | sales_date

    The hosting table would contain:
    order# | domain_name | start_date | location | salesman | customer# | sales_date

    The domain table would contain:
    order# | domain_name | start_date | salesman | customer# | sales_date

    Should I have one table called orders that contains the common columns like salesman, customer# and sales_date and then use the order# to get the information from appropriate table? The company will probably add more products in the future.

    Any advice would be appreciated.

    cross posted in PHP and webdev

    Source: http://www.livejournal.com/community/webdev/211072.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home