Jump to content

coded4u

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by coded4u

  1. I have a way of hiding the path of a download, but not sure how you will stop them from copy/paste to a friend for them to get access. I'm making the user enter their Email address & the confirmation code. (Before downloading they enter a few details and it sends them a email) Then it will check the database for their details and on the database i have the path saved to the .zip. Another php file headers them to the .zip so they don't move off that page. But sorry i can't help you out on this. I should looking to how to use buy it now on paypal myself. Wish you all the best.
  2. Rite, well i'm not sure with buy it now payment on paypal as i haven't tried. Can't help you out on this one sorry. Are you wanting the to have access to the download rite after the payment has been made or are you going to do it manually?
  3. Have you set anything up for the payment side of things? If not then i think you're getting ahead of yourself a little lol. Plan out how you're going to process the payment, then you'll know how to deal with giving them access to the file if the transaction has been completed.
  4. Is this a one time download or would you like the user to be able to access the download again? I'm working on something the same apart from my downloads are going to be free. I'm going to allow the user to download it once and then stop them getting access to the download.
  5. Not sure how you will be passing the data to the php but here's the query <?php //--- Connection must be made before saving anything // You can either type the connection string here or save it & include it: include("connection.php"); //---- Data you want to save $title="Topic"; $question1="Answer"; $question2="Answer"; $question3="Answer"; $question4="Answer"; //---- Run mysql query to save the data. mysql_query("INSERT INTO tablename (Title, Question1, Question2, Question3, Question4,) VALUES ('$title','$question1','$question2','$question3','$question4')"); ?> If you use the post method to save the data make sure you add something to stop SQL injections. Example: mysql_real_escape_string
  6. This should be in the PHP section, not HTML. but just edit your code a little.... <?php $pc = $_POST['pc']; If ($pc == 0) { $pcText = "<a href=\http://www.yahoo.com\">SomeText</a>"; } else if ($pc == 1) { $pcText = "<a href=\"http://www.google.com\">SomeText</a>"; } ?> <p>Website: <?php echo $pcText ?> </p>
  7. Get the users to put the.exe file into a zip/RAR and upload it that way? Once a user downloads it they can always un-zip it the folder before installing. I wouldn't allow anyone to upload .exe files on my host anyway.
  8. I wasn't too sure what the folder would be containing as the description didn't give much details, i think i'll take a copy of that myself though as i might need it.
  9. <?php // Removing a directory & all its content // glob('DIR/PATH/{,.}*', GLOB_BRACE); -- GLOB_BRACE will remove any hidden files in the directory. $files = glob('DIR_NAME/{,.}*', GLOB_BRACE); foreach($files as $file){ // Loop through each file in the DIR if(is_file($file)) unlink($file); // Removing the file from the DIR } //If you don't want to remove the folder then remove the line below this comment. rmdir('DIR_NAME'); // Remove the DIR ?> I hope this is helpful.
  10. Yeah i can see what you're getting at. Sorry, still new to all this myself. I shall double read any reply before submitting it. Thank you for you advice.
  11. Here I know this works, i just tested it on my localhost. Hope you get some good use out of this. <?php // If your image is in a folder: images/image.jpg $image="image.jpg"; $split= explode(".",$image); $format=end($split); list($width, $height, $type, $attr)= getimagesize($image); if(($width>550)||($height>650)){ $target_file = $image; $resized_file = $image; //this will overwrite the file, want to make another copy $resized_file = "Resized_".$image; $wmax = 550; $hmax = 650; image_resize($target_file, $resized_file, $wmax, $hmax, $format);} //--------- The function function image_resize($target, $newcopy, $w, $h, $ext) { list($w_orig, $h_orig) = getimagesize($target); $scale_ratio = $w_orig / $h_orig; if (($w / $h) > $scale_ratio){$w = $h * $scale_ratio; } else {$h = $w / $scale_ratio;} $img = ""; $ext = strtolower($ext); if ($ext == "gif"){$img = imagecreatefromgif($target); } else if($ext =="png"){$img = imagecreatefrompng($target); } else {$img = imagecreatefromjpeg($target);} $tci = imagecreatetruecolor($w, $h); imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig); if ($ext == "gif"){imagegif($tci, $newcopy); } else if($ext =="png"){imagepng($tci, $newcopy); }else{imagejpeg($tci, $newcopy, 100);}} ?>
  12. Use Ajax new XMLHttpRequest(); As for the content being updated you can use new XMLHttpRequest(). responseText to return the update.
  13. your ending the <?php tags before closing the if statement. Strange way of returning html to screen but if you're doing it that way then try... I'd also just put the name of the page in the form action="example.php" 19054_.php
  14. You also need to secure the $_POST[''];'s, you mailer isn't secure & people will use it to spam. You also want to strip out and mail forward commands CC: BCC:, stop the email being sent to other email addresses they throw into the field
  15. Bad move, you need to secure the $_POST[] before you throw it into a session. any posted data from a user should be checked/cleaned & made secure. Failing to do so a user can inject code into the post, cause a lot of damage depending on what you have running in your php & what the person injects.
  16. WOW! That has to be the worst method ever. Due to the posted data not being checked for any bad strings you're putting your website at high risk. You need to clean up the posted data before doing anything. Also, i recommend using ajax to post your data, not page flicker.
  17. But that means paying for Zend Guard & takes the fun out of trying to create something myself. Thanks anyway.
  18. Its just a project i want to build up on, i want to see how secure i can get it. I don't want to pay for other php encoders or anything. Takes the fun out of doing it myself... but if i can get it pretty secure then i will no doubt use it for the free downloads.
  19. Maybe try... if (($row['pciaccom']="1" && $row['pciair']="1") ||( $row['issuerac']="1" && $row['issuerair']="1")) {
  20. I have written something to encode my PHP Source code for my website, i'm going to use it for the download i give out for free. I want to encode it so people can't view/edit the real source code. I have managed to encode it and then decode it so it will run. Not too bad for those who don't really know how to use php as they wont know what to remove to get the real source code, but for those who know how to use php will get access to the real source code. This is what i'm using, if anyone has anything a little more advance then that would be great. (I know anything encoded can be decoded) I just want to try make things harder for them to decode it. Encode: <?php $php='The php source code...'; base64_encode(gzdeflate($php)) ?> Decode: <?php eval(gzinflate(base64_decode('S03OyFdQD/AIUAjOLy1KTlVwzk9JVbdWAAA='))); ?> If the user replaces eval for echo it will display the php, so maybe i need something that will stop the user removing eval? If eval isn't in the code dont run anything, something like that... i dont know, like i said, could do with some help from you guys.
×
×
  • 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.