Jump to content

Ninjakreborn

Members
  • Posts

    3,922
  • Joined

  • Last visited

Everything posted by Ninjakreborn

  1. The id is paypal is only paypal. The IPN system is meant for paypal to send data BACk to you that you pass through the form. Basically this is the process. * Force the user's to register * When they register pass there user id into a session everytime they login. * When you do your paypal form add a hidden field into the ipn system (based on the specifications listed in there documentation). * When they submit paypal processes the payment and does it's thing. DURING that process it sends a post token BACK to a page you specify as the IPN pge where you can grab the id, do some programming to do whatever database work you need, and that's it. That's the IPN system. IF you aren't advanced there is another (not as secure way). That is naturally use paypal, but set a session before they buy. After paypal ssends the user physically back to the site then grab the id and do it when the user get's back by running the script in the browser. This is not as secure because if they choose not to "Go back to vendor" from paypal then they never get to the processing scripts, and so you never know they paid. Without physically checking. However if you do it with IPN then it's almost full-proof.
  2. If you are using mysql then use the mysql_real_escape_string function. If your using another database platform or setup then you can go ahead and use there built in features for escaping bad characters. Either way if there is no other solution then use add slashes function. If nothing is working I don't know what to tell you. Or if you are using one of them and it's not escaping then I have no idea. Unless php is in safe mode and that function is disabled, which is unlikely.
  3. * Save the array in a session. * Save the array in a cookie * Save the array itself in a db (seperate table) and retrieve it with the ip. The problem is when you submit it completely erases all memory that was on the page. If you submit something ti's submittted. If you submit something else it submits something else (not naturally maintaining what was originally submitted). Thus another problem that requires saving state. As explained above.
  4. You mean file handling. Google "File handling tutorial". Basically you need * A form for them to be able to submit the files * The error validation (check make sure the file has the right extension, or whatever else you want to verify). * The processor You are going to need to process the file in multiple ways. There are 2 steps. It's transition to temporary data, then from there over to actual server hard disk space. The temporary is generally done on it's on. Depending if you have the ini options set properly. If they are then you are just able to take the file and use PHP's various built in file handling functions. Google "PHP File Handling Functions" to get multiple references related to file handling. For another resource you can also visit www.w3schools.com and choose "PHP" on the left side navigation. Once there you can navigate to the information pages and on the left hand side you will see information about filehandling. Go there for full reference listings as well tutorial examples. Another option would be to google "PHP File Handling Classes" if you know some about object oriented programming, and want to slim down the process of learning file handling (or if your in a hurry).
  5. There are a few potential solutions. 1. Check php.net under the number_format function. Check in the user's notes to see if anyone has a better function for what you want. 2. Look up tutorials online about formatting numbers. 3. Look up tutorals ON that function and see if there is a way to use it to get what you need. 4. Use regular Expressions or substr to find and and remove the ',' symbol inside the string/number.
  6. Pretty much when they click on the accept link it takes them to a page with javascript doing a time wait. it's not too hard. 1-2 lines of javascript code will count down whatever amount you want, THEN execute the action set to execute after the timer runs. So it won't be too hard to put it into your current system without having to drastically change everything. Google (Javascript time delay) or something similiar.
  7. Is thorough command line the backbone of programming languages. Meaning if one knows command line properly, they have far greate power than any user that does not? I am asking because I have noticed generally everything is easier via command line. Mysql controlling is easier through command line (loading databases), starting, stopping and restarting apache is easier using command line. Does anyone know of good tutorials that are more "Basic" that are related to command line. For example how to open a file in command line, how to delete 1 file in command line, safety precautions to prevent you from destroying your computer because of not knowing how to properly wield the power known as command line. Thanks for the advice.
  8. Basically count is the number of row's we need total. Temp is suppose to be so it can stop when it get's to the count. What is wrong with this while loop. I have tried it and it throws the browser into a seeming endless loop, then asks if I want to kill the script because it's going to make ie lockup? Any advice on this one? function product_add() { // get values from form var product_name = $('#productcodes').attr('value'); var count = {{$count}} var temp = 1; // get random character to use as id, until we get data from the db. var randomnumber = Math.floor(Math.random()*70); // create new row in the table $('#blank_row').before( $('#blank_row').clone().attr('id', 'user'+randomnumber).show() );// clone blank row before blank row // replace all the names of the new row, with the new one $('#user' + randomnumber + ' .blank_name').attr('id','user_name_'+randomnumber).click(editField); while (temp < count) { $('#user' + randomnumber + ' .blank_' + temp).attr('id', 'user_value' + temp + '_' + randomnumber).click(editField); temp = temp++; } $('#user' + randomnumber + ' .blank_rec').attr('id', 'user_rec_'+randomnumber).click(editField); // fill in the html data with the related data. $('#user_name_' + randomnumber).html(product_name); $('#user_value1_' + randomnumber).html('30'); $('#user_value2_' + randomnumber).html('30'); $('#user_value3_' + randomnumber).html('30'); $('#user_value4_' + randomnumber).html('30'); $('#user_value5_' + randomnumber).html('30'); $('#user_value6_' + randomnumber).html('30'); $('#user_value7_' + randomnumber).html('30'); $('#user_value8_' + randomnumber).html('30'); $('#user_value9_' + randomnumber).html('30'); $('#user_value10_' + randomnumber).html('30'); $('#user_value11_' + randomnumber).html('30'); $('#user_value12_' + randomnumber).html('30'); $('#user_rec_' + randomnumber).html('yes'); $('#user_rec_' + randomnumber).after('<td><a href="#" onclick="product_delete(' + randomnumber + '); return false;">Delete</a></td>'); // remove data from form after everything else is done, so a new one can be added }
  9. Oh, I figured it out. I changed the +1 day to +1 month.
  10. I have created the following function but it doesn't have the exact affect, but it's as close as I have gotten so far. // get dates into start and end $startdate = $prod_codes[0]['award_date']; $enddate = $prod_codes[0]['end_of_term']; $range = array(); // empty array to trap ranges if (is_string($startdate) === true) { $start = strtotime($startdate); } if (is_string($enddate) === true ) { $end = strtotime($enddate); } if ($start > $end) return createDateRangeArray($end, $start); do { $range[] = date('Y-m-d', $start); $start = strtotime("+ 1 day", $start); } while($start < $end); pr($range); This creates an array and output's it, but not creating it like I want. Here is the array result. There are over 500 in that array but you can get the point. It's creating an array using the "DAY" as what to create by. I need it to do the SAME theory it is using now except instead of using the DAY to make the range, it would use the month, for example. 01-05-07 02-05-07 03-05-07 Just as an example, to do it by month, instead of by day. Any advice on what I can do to this function to make it do what I am wanting it to do?
  11. How do I get a series of date ranges by a start date and end date. For example Start Date - 02/14/06 End Date - 05/04/08 I need to take that start date and end date, then generate an array that has every month in between. Array[1] - 2-14-06 Array[2] - 3-14-06 Array[3] - 4-14-06 All the way up until the end date. However the start date and end date can be however far about it wants, and I need to be able to accurately grab the date ranges. If possible I need to be able to also count how many ranges there are too. If you can help I would be greatly appreciative.
  12. How would I change a number formatted like 0.056 into one formatted like 5.6%. basically I need to take any number with a 0.056 type of format over to a 5.6 type of format. Is this possible, if so how, and thanks. Merry Christmas also.
  13. 1. Don't use short tags. 2. Clean it up some. Did the people above help fix your problems earlier, or are you still having some issues with it?
  14. No, you didn't. I edited my statement above because of the misunderstanding. Can you explain one more time what you are wanting exactly. Did you mean someone to copy actual text on a site, then when they copy it pull's the xhtml behind what they copied instead of the actual visible text?
  15. Then you just create the basic crawler using file get contents on the url's. When you get the data from the xhtml files then your going to write a parser. Google "regex" and go through some tutorials on it. You'll want to use regex to get everything out of the head and body sections, leaving the rest. Then from there you can customize it to be more specific based on exactly what you are needing. Note this is against the copyright laws of most site's, as well as against personal site policies. Be ready to get the ip of your server banned from ever being able to visit the site again if you misuse what you are trying to create.
  16. If you are wanting something like this, you can take a look at wikipedia. go to www.mediawiki.com and download one of there copies of the software. Look behind the coding and work through it to learn how they did the edit feature and view source feature. Also look at syntax highlighting functions inside of php, they may come in handy for you as well.
  17. Misread, apologies. Ignore my message. I had noticed Anon asking about the web crawler 2 times,and I didn't know it was a different person until after I had responded. Apologies.
  18. It sounds to me like you want to visit a site, and make a copy of the pages on the site and get the information out of them, then database the page.. It's going to be easier to just take a screen shot of the page. In that case your going to want to look at Perl, they have a really good class for carbon copying image's of specific web pages.
  19. You do not under any circumstances do not want to try a game with procedural. You are going to want to rewrite it using OOP. I can't even imagine trying to quickly add features into an ever-growing game having to cut through procedural. YOu need to handle all of those things with OOP functions. You would have a function for attack inside your class. class Basics extends Core { function attack () { } } Your going to want to redo most of that in OOP if you try to cut through that code to update/change/enhance code you'll notice later on down the road that you will have 4-5 times the amount of time to enhance it as opposed to OOP.
  20. That's what it's used for. You did good.
  21. It depends. You can learn stuff over time and start building basic stuff in a matter of 3-6 months. What are you asking, be more specific?
  22. You don't learn XML. You use it. I tried learning what xml was by tutorials and it was futile. I had to actual use it for it to make sense. XML is a database of sorts, but not really a database. It's a way to "Store" data so other languages can easily get access to it. They are well formed tags, that the user creates. If you are wanting some good tutorials on it study "Basic xml tutorials" or google "What is xml" to get some of the basics before you move forward. After that head over to www.w3schools.com to reinforce that knowledge, then jump into a personal project to grab some necessary field experience.
  23. Download xhtml pages for archival. You mean grab all of the source content. For that you are going to need a crawler, and xhtml parser. PHP/Perl would both be pretty good at it. But I prefer PHP for anything I can, there won't be much of a difference.
  24. Go to your .htaccess file in your server via ftp. Copy the contents within that file, and paste it here.
  25. Flash isn't that expensive anymore. I can get most flash work accomplished for pretty decent prices. Just look around GAF or the "Freelance" forums for someone to build it for you. It would take a long time to develop if you didn't know any of the stuff really. You can probably hire someone to replicate someting like that link you showed for around 2,500 and if they knew what they were doing it would probably take them about 3-5 weeks. (just estimations). As far as learning. You would need to learn flash/actionscript. Xhtml, css (for layout design). Minor graphic design to get the graphics down (or use a template). If you are wanting to know what orders to learn things, I recommend. * Xml * Flash (design aspect) * Action Script (Programming aspect) * The PHP That way with the xml you have a better understanding of how to load data into flash (one method) Then the flash/actionscript once learned php will help you to communicate between the 2 using xml.
×
×
  • 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.