Jump to content

Shannon

Members
  • Posts

    18
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.reversedreality.com
  • Yahoo
    slpaige51

Shannon's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. I hate double posting, but heres a quick example of what I've done with this since a few of you were interested in how it would work..... Here is a few lines of code i put in a test.php file to opening the image and tossing it into a buffer..... ><? $img = $_GET['img']; $img = preg_replace('/[^a-z0-9A-Z.]/', '_', $img); Header("Content-type: image/x-png"); $fn=fopen("/home/your_account/public_html/imagehost/$img","r"); fpassthru($fn); ?> Here is a quick demonstration that I threw up as a test.... http://www.reversedreality.com/imagehost/TCH_forums.php inside the actual test php is where you can track views, etc... since each time that file is viewed or looked at, it has to hit that page where you can do various neat and fun stuff. Hope this helps out anybody who has similar ideas for a image hosting site.
  2. Will do. Its not so much a script that I discovered but a process for doing it (looking at source code, but I don't use their code, I like to use a way of doing something in my own way - my own code rather). You would do http://www.something.com/your_image.php?id=xxxx and along mod_rewrite somehow in there it somehow servers up the image, but i'm still working on that part. But linking to your image that way, you can update a database record each time the file is accesed (using code inside the php page), even if the image is included in a page somewhere like a forum. If you know the file size, you can get a rough estimate of how much bandwidth the file has used by multiplying the number of times accessed by size as well as the number of times each image has been viewed. I'll have to remember this post and update you on how it worked if I can ever get it working on the revised site that i'm working on.
  3. I think I may have found something that I can use. Thanks for the suggestion.
  4. sorry, I should have mentioned that I'd seen awstats tracking this type of information, but was curious as to whether or not this would be information I could track in a database of my own, like every time the file is viewed remotely (or locally) it could insert a flag into a database with image information tied to a user account. Awstats does that type of thing (showing bandwidth per file/image, etc....) but I wasn't sure if I could access the same data that Awstats does without having a higher level access. Hope that clears up my question
  5. I have a feeling this isn't possible without having some type of root access, but here goes. Does anyone know of any script or program that can track number of file views (such as views from hotlinking images) or track the amount of bandwidth said image is consuming based on the number of views? Is it possible to even track these types of stats without having access to some backend process? The reason I was asking is I have a small site that hosts images for people to use as a signature in forums. Was wondering if its possible to track image usage. Thanks.
  6. I think i would rather live in a US where half is a shallow ocean than live on a red planet with barely any water or a moon. And rich people leaving like rats on a sinking boat is so far in the future we'll all be worm food before it happens.
  7. Makes sense, thats exactly what i was going to do, i'm running my current site on a subdomain figured i'd add a few more. Thumbs Up
  8. I've been using a starter hosting plan that i signed up for probably close to a year ago. I recently created a sig hosting site for a fansite i'm an admin of. I'm ok with space and bandwidth at the moment, but i want to create a "portfolio" of sites for practice and possibly for other things. What all involves an upgrade? Would i stay on the same server I'm currently on (server 6) and just get higher bandwidth/storage, or would i have to actually change servers resulting in some downtown while the ip address propogates? Also, would i need to submit a help ticket? Sorry for so many questions, just wanted to make sure before I broke my site on accident. And if this not the correct forum, sorry about that too.
  9. if you have borders around your images (you mentioned they are gifs) do this: <img src = "....." border="0"> that should remove the border form the image, if you haven't done that yet.
  10. thanks for the feedback. After reading countless informational topics i realized what you guys were talking about. This was the first time i'd really got into the file system functions that php can use, so it was a learning experience, but i did get it to do exactly like i needed. Your last example MikeJ really cleared the air though. Thanks.
  11. i've been somewhat successful with my uploading of images, but only if the destination directory is chmod 777. Also, I try to chmod() the directory after i create it within my php code and get this error message Warning: chmod(): Operation not permitted in /home/username/public_html/hosting/new_account.php on line 150 using the ftp commands, i'm able to easily create the directories that i was needing, no problems, just cant change the mode without manually ftping into my account and doing it that way. Also, hosting and new_account directories are both set to mode 777. heres the code that is doing that the directory creation, etc... >$connection = ftp_connect(my_domain'); $ftp_username = 'my_login'; $pass = 'my_password'; $login_result = ftp_login($connection,$ftp_username,$pass); // check to make sure you're connected: if ((!($login_result)) or (!($connection))) { // error....do something } else { // we're good to go -- the connection was made ftp_chdir($connection,'/public_html/hosting/user_images/'); ftp_mkdir($connection,$username); //do this since cant use ftp_chmod (version 5.x only) is the path correct? $chmodpath = "/home/username/public_html/hosting/user_images/$username"; chmod($chmodpath,0777); ftp_close($connection); } if one of you guys has any ideas, i'm definately open to input and suggestions, this has got my stumped. Maybe i'm just not seeing something that i should? Thanks.
  12. well, i found a way to create a folder, not sure if i'll be able to upload to it, but i'm hopefull. =) Instead of using the mkdir command I created it via ftp (as in coding the ftp stuff on the page so its automatic). while browsing forums and such, i saw that other people had to use this format to do what i was trying to do due to security settings or somethign i think. So I think i'm all good. But still wondering exactly how to do this using the php only method (not having to use ftp). Oooooh well. =)
  13. i see you fixed it. I had this problem at a former job. It turned out that i couldn't submit (and actually capture) text using get when the entire url including the text area text was over 2000 characters which actually was more like 1960 or so since the other part of the url was about 40 characters long give or take. But i did like you did and switched the form method to post from get and it was solved. Glad you got it fixed though.
  14. I've been working on a little site for some sig hosting for a website i staff at. What i've been trying to figure out is this. I know to make a directory with php, i need to do mkdir("path",permissions). But so far its not working for me What i was trying to do was whenever a user created an account, there would be a folder created in a certain location /public_html/website_dir/users_images/here but i guess i'm missing something, since so far i've had no luck. I've tried doing the /home/account/public_html/website_dir..... and nothing happened. Is there something i'm missing in regards to the servers here? or maybe my .htaccess or php.ini files or maybe folder permissions perhaps? Any help would be greatly appreciated. Thanks!
  15. thanks for the info, it connects to the server, but i still get access denied. So i put in a help desk ticket to allow remote connections if its currently disabled. Everything else works though, just thought it would be nice to use some of the advanced features of dreamweaver. edit: now i feel really dumb, i tried again (as an afterthought) with a password i haven't used for a long time, and sure enough, it works... now i have to remove my help ticket... ack!
×
×
  • Create New...