Jump to content

westman

Members
  • Posts

    600
  • Joined

  • Last visited

Posts posted by westman

  1. ok i got good news and badi can download my images with this code...

    header('Content-Description: File Transfer');header('Content-Type: image/jpeg');header("Content-Disposition: attachment; filename=mypic.jpg");readfile('images/pics/3.jpg');

    it works fine and has been tested with different type of .jpg filesbut when i download the .jpg file needed i can not open it and i get a windows error..."Windows photo viewer can't open this picture because the file appears to be bamaged, currupted, or is too large."

  2. the 1st line of code i have in my main script is...session_start();can i get a code example of a standalone download script and how it gets called in a main page script please, maybe that would help.

  3. no it did not work i got this error...Warning: Cannot modify header information - headers already sent by (output started at /home/content/31/9408631/html/index.php:91) in/home/content/31/9408631/html/adult/index.php on line 681 Warning: Cannot modify header information - headers already sent by (output started at /home/content/31/9408631/html/index.php:91) in/home/content/31/9408631/html/index.php on line 682 Warning: Cannot modify header information - headers already sent by (output started at /home/content/31/9408631/html/index.php:91) in/home/content/31/9408631/html/index.php on line 683 Warning: readfile(http://mysite.com/images/pics/3.jpg) [function.readfile]: failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error in/home/content/31/9408631/html/index.php on line 684

  4. that's cool,i am now trying to download my hidden images i tried...

    $down_file = "http://mysite.com/images/pics/3.jpg";header("Content-Disposition: attachment; filename=pic.jpg");readfile($down_file);

    but it did not work, any help?

  5. i tried it but id did not work,my code looks like this.... index.php

    <img src="image.php">

    image.php

    header("Content-type: pics/2/2");echo  file_get_contents("pics/2/2.jpg");

  6. ok i used... Order Allow DenyDeny From Alland that seems to be working ok, but i did not understand ... <img src="showimage.php?imageid=1"?>or a way php can show the image to the user

  7. how do i use .htaccess to prevent direct file accessing?i tried it in some script before and i could not control it, and in the end i could not access to a file as the admin of the site

    mail()

    i don't no what happened but i left the script and came back 12 hours later and it now works. i have no idea what the problem was, but the main thing is that it is working now ;)

    mail()

    hi again i got a sign up script that works, the only thing that does no work is mail()when my script runs i do not get an emailthis is my script.... $to = $signup_email;$from = "service@mysite.com";$subject = "Complete your registration";$message = '<html><body bgcolor="#FFFFFF">Hi ' . $signup_username . ',<br /><br />You must complete this step to activate your account with us.<br /><br />Please click here to activate now <br />http://www.mysite.com/activate/activation.php?id=' . $id . '&sequence=' . $db_password . '<br />If the URL above is not an active link, please copy and paste it into your browser address bar.<br /><br />Your Login Data is as follows: <br /><br />E-mail Address: ' . $signup_email . ' <br />Password: ' . $signup_password . ' <br /><br /> </body></html>';$headers = "From: $from\r\n";$headers .= "Content-type: text/html\r\n";mail($to, $subject, $message, $headers);

  8. omg its working so well i even got my "session_start();" working and setting variables for logged in or out users ones again thank you i have so much to learn about php speaking of learning could some1 recommend a site to learn php from day 1, i have looked at this site (w3schools) but the English used is not for beginners (meaning jumping straight in to technical terms like line breaks lol) so its hard to keep up

×
×
  • Create New...