feddonish Posted January 29, 2011 Share Posted January 29, 2011 Im using a moodle platform, and ive noticed that if i open my profile picture, the link is like this: http://randomwebsite.com/moodle/user/pix.php/12345/f1.jpg Ive also noticed that if i change those numbers in the link, i get other peoples profile pictures., if they have uploaded one, else i get the default picture. What i want to do is to create a script that goes through all those and saves them on my computer. ive tried creating with Java and one in PHP. but the problem is that i always end up with a load of default picture instead of the real ones, and ive come to the conclusion that it is because of the cookies not existing in those scripts and thus not having permissions to see them. i could go manually through them in my browser tab where im logged in and save them, but i ask you if you know any way i can make my scripts work, or something else that could automatize this task. i think ive included everything, thanks in advance! Quote Link to comment Share on other sites More sharing options...
feddonish Posted January 29, 2011 Author Share Posted January 29, 2011 forgot to add. the code i use for saving the files is: <?php header('Content-disposition: attachment; filename=f1.jpg'); header('Content-type: image/jpeg'); readfile('http://randomwebsite.com/moodle/user/pix.php/12345/f1.jpg'); ?> i have not included the loop yet, but that is irrelevant atm. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.