1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Uploading images to another site on same host?

Discussion in 'PHP' started by adamjblakey, Nov 6, 2008.

  1. #1
    Hi,

    I have a hosting platform with all my websites on what i want to do is from my main domain name upload images to others websites.

    The path on each of my websites is:

    /var/www/vhosts/domain.com/httpdocs/

    I have a function which i use to upload image i though by putting this as the destination path to where the image is uploaded but change the domain.com it may work as i was on the same hosting platform but it did not work. How would i go about doing this?
    SEMrush
    Cheers,
    Adam
     
    adamjblakey, Nov 6, 2008 IP
    SEMrush
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,731
    Likes Received:
    26
    Best Answers:
    13
    Trophy Points:
    175
    #2
    Mostly scripts don't have access on those paths, why not creating a small script on one of the domains using it on all the domains?
     
    EricBruggema, Nov 7, 2008 IP
  3. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #3
    There are many alternatives but I prefer, and I use, the FTP way.
    Upon upload completion, use PHP's FTP commands (and they are very simple and straight forward) to connect to other domains and upload the file to them.
     
    Lordo, Nov 7, 2008 IP
  4. rohan_shenoy

    rohan_shenoy Active Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Contact your host. Owner of both the sites(domais or hosting packages) will need to tell the host that they want the transfer. Your scripts don't have sufficient privileges to do that.
     
    rohan_shenoy, Nov 7, 2008 IP