Jump to content

coded4u

Members
  • Posts

    21
  • Joined

  • Last visited

About coded4u

  • Birthday 01/02/1989

Contact Methods

  • Website URL
    http://www.coded4u.com

Profile Information

  • Gender
    Male
  • Location
    UK
  • Interests
    Learning web development.

coded4u's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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.
×
×
  • 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.