acidglitter Posted January 4, 2008 Share Posted January 4, 2008 This is one of my new websites http://candyadds.com/ Tomorrow when the points reset there will be a lot of new VIP members. So there will be a lot more images being direct linked from myspace. Since the images are being direct linked from myspace does that hurt my bandwidth? And I'm wondering if there is a script that could go to someones myspace page, get their default picture and make it into a new picture thats only 80x80 pixels and say 15 kb. Because if I could do that all of my pages would load a LOT faster. The pictures on there now are only resized with CSS. The original sizes are usually 170x226 pixels and 40 kb. Quote Link to comment https://forums.phpfreaks.com/topic/84552-solved-automatically-make-images/ Share on other sites More sharing options...
drummer101 Posted January 4, 2008 Share Posted January 4, 2008 You would be using myspace's bandwitdh Quote Link to comment https://forums.phpfreaks.com/topic/84552-solved-automatically-make-images/#findComment-430782 Share on other sites More sharing options...
hitman6003 Posted January 4, 2008 Share Posted January 4, 2008 Since the images are being direct linked from myspace does that hurt my bandwidth? No, but it's considered impolite to do so, and if myspace doesn't like that they could block people from doing so when the referrer is your web site. And I'm wondering if there is a script that could go to someones myspace page, get their default picture and make it into a new picture Yes, there are scripts...I don't know of any off hand. The basic principle is to use a command like file_get_contents to retrieve the image, then use the GD commands to manipulate it. http://www.php.net/file_get_contents http://www.php.net/gd Quote Link to comment https://forums.phpfreaks.com/topic/84552-solved-automatically-make-images/#findComment-430784 Share on other sites More sharing options...
acidglitter Posted January 5, 2008 Author Share Posted January 5, 2008 Okay those are completely new to me so I'll try looking up some tutorials and then post back if I still need help. Thanks for your help! This is kind of a dumb question, but right now my site is taking forever to load. Is the most likely reason for this because there are like 100+ visitors and way too many large images? And besides resizing the images so they load faster, are there other ways to make the site load more quickly? Quote Link to comment https://forums.phpfreaks.com/topic/84552-solved-automatically-make-images/#findComment-431341 Share on other sites More sharing options...
acidglitter Posted January 5, 2008 Author Share Posted January 5, 2008 So I'm having problems.. I have one file that gets a picture from my site and resizes it and displays it alright.. Like it resizes everything and at the bottom of the page I have this to display it and then the page ends. header('Content-type: image/png'); imagepng($image_resized); imageDestroy($image_resized); What I'm trying to do is have another page take that page and save it as a picture to a folder on my site. I just have this right now and it copies it, but when you go to the address it says the image has errors, and if you view the source it shows the php code from the above page..... if(copy($url, $path."file.png")){ echo "it worked!<p>"; echo $path."file.png"; } else { echo "failed"; } So what am I doing wrong? Quote Link to comment https://forums.phpfreaks.com/topic/84552-solved-automatically-make-images/#findComment-431435 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.