Activity Stream
48,167 MEMBERS
61015 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1.     
    #1
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

    Default Remote Upload Help

    Hi, need help wit this code, well just too display bk to da end user:

    PHP Code: 

        
    elseif ($_POST['remoteUpload']) {
            
        
    $urls explode("\n"$_POST['remoteimage']);
        
    $imgarray = array();
        foreach (
    $urls as $url)
        {
            
    $url trim($url);
            
    $imgname basename($url);
            
    $localimg $uploadDir .'/'$imgname;
            
    $img file_get_contents($url);
            
    file_put_contents($localimg$img);
            
    $url $baseurl $imgname;
            echo 
    "<div align='center'>You've just successfully uploaded $img.</div>
            
            <div align='center'><a href='
    $img'><img src='$img' alt='Uploaded image'></a></div>
            
            <div align='center'>Direct Image Links</div>
            
            <p align='center'>URL: <input tabindex='1' value='
    $siteURL/$uploadDir/$ig' onclick='this.focus();this.select();' /></p>
            
            <p align='center'>HTML: <input tabindex='2' value='&lt;a href=&quot;
    $siteURL/$uploadDir/$img&quot;&gt;&lt;img src=&quot;$siteURL/$uploadDir/$img&quot; border=&quot;0&quot;&gt;&lt;/a&gt;' onclick='this.focus();this.select();' /></p>";
        }
        } 
    this is wot im getting, all unusual characters.

    any help?
    Chris2k Reviewed by Chris2k on . Remote Upload Help Hi, need help wit this code, well just too display bk to da end user: elseif ($_POST) { $urls = explode("\n", $_POST); $imgarray = array(); foreach ($urls as $url) { Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Developer
    Edit: hold on i get what u mean i will post in a moment

    try this

    PHP Code: 
        elseif ($_POST['remoteUpload']) {
            
        
    $urls explode("\n"$_POST['remoteimage']);
        
    $imgarray = array();
        foreach (
    $urls as $url)
        {
            
    $url trim($url);
            
    $imgname basename($url);
            
    $localimg $uploadDir .'/'$imgname;
            
    $img file_get_contents($url);
            
    file_put_contents($localimg$img);
            
    $url $baseurl $imgname;
            echo 
    "<div align='center'>You've just successfully uploaded $img.</div>
            
            <div align='center'><a href='
    $img'><img src='$img' alt='Uploaded image'></a></div>
            
            <div align='center'>Direct Image Links</div>
            
            <p align='center'>URL: <input tabindex='1' value='
    $siteURL/$uploadDir/$ig' onclick='this.focus();this.select();' /></p>
            
            <p align='center'>HTML: <input tabindex='2' value='"
    .htmlspecialchars_decode("<a href=\"$siteURL/$uploadDir/$img\"><img src=\"$siteURL/$uploadDir/$img\" border=\"0\"></a>")."' onclick='this.focus();this.select();' /></p>";
        }
        } 
    Bots Development | Web Development | Wordpress Customization | PSD Conversion

    Life has many twists and turns in it, you have to take what you are given and use it for the best.

  4.     
    #3
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    still the same.

  5.     
    #4
    Respected Developer
    From above code replace this line
    PHP Code: 
    htmlspecialchars_decode("<a href=\"$siteURL/$uploadDir/$img\"><img src=\"$siteURL/$uploadDir/$img\" border=\"0\"></a>"
    with
    PHP Code: 
    html_entity_decode("<a href=\"$siteURL/$uploadDir/$img\"><img src=\"$siteURL/$uploadDir/$img\" border=\"0\"></a>",ENT_QUOTES
    http://www.php.net/manual/en/functio...ity-decode.php
    Bots Development | Web Development | Wordpress Customization | PSD Conversion

    Life has many twists and turns in it, you have to take what you are given and use it for the best.

  6.     
    #5
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    no change.

  7.     
    #6
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Could you please output what you are getting ??

  8.     
    #7
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

  9.     
    #8
    Respected Developer
    uhm i thought you was getting html characters, seems you are outputting image itself, change this
    $siteURL/$uploadDir/$img
    to
    $siteURL/$uploadDir/$imgname

    change all $img to $imgname where you are echoing
    PHP Code: 
     echo "<div align='center'>You've just successfully uploaded $imgname.</div>
            
            <div align='center'><a href='
    $imgname'><img src='$imgname' alt='Uploaded image'></a></div>
            
            <div align='center'>Direct Image Links</div>
            
            <p align='center'>URL: <input tabindex='1' value='
    $siteURL/$uploadDir/$imgname' onclick='this.focus();this.select();' /></p>
            
            <p align='center'>HTML: <input tabindex='2' value='"
    .htmlspecialchars_decode("<a href=\"$siteURL/$uploadDir/$imgname\"><img src=\"$siteURL/$uploadDir/$imgname\" border=\"0\"></a>")."' onclick='this.focus();this.select();' /></p>";
        } 
    Bots Development | Web Development | Wordpress Customization | PSD Conversion

    Life has many twists and turns in it, you have to take what you are given and use it for the best.

  10.     
    #9
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Actually, the code mRaza gave should fix the main problem

    But theres a problem in that:

    PHP Code: 
    <img src='$imgname' alt='Uploaded image'></a
    That will link to the imagename which will not show you the image

    PHP Code: 
    if ($_POST['remoteUpload']) {
            
        
    $urls explode("\n"$_POST['remoteimage']);
        
    $imgarray = array();
        foreach (
    $urls as $url)
        {
            
    $url trim($url);
            
    $imgname basename($url);
            
    $localimg $uploadDir .'/'$imgname;
            
    $img file_get_contents($url);
            
    file_put_contents($localimg$img);
            
    $url $baseurl $imgname;
            echo 
    "<div align='center'>You've just successfully uploaded $imgname.</div>
            
            <div align='center'><a href='
    $imgname'><img src='$localimg' alt='Uploaded image'></a></div>
            
            <div align='center'>Direct Image Links</div>
            
            <p align='center'>URL: <input tabindex='1' value='
    $siteURL/$uploadDir/$ig' onclick='this.focus();this.select();' /></p>
            
            <p align='center'>HTML: <input tabindex='2' value='"
    .htmlspecialchars_decode("<a href=\"$siteURL/$uploadDir/$imgname\"><img src=\"$siteURL/$uploadDir/$imgname\" border=\"0\"></a>")."' onclick='this.focus();this.select();' /></p>";
        }
        } 

  11.     
    #10
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    Thanks guys, working fab...

    now do u no how to rename to each image to trhe time UTC as i have for local files..

    mRaza and Soft2050 pm me ur paypal id's, i wanna send 5$ each for tha help.

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Want to know about remote upload!
    By xps15z in forum File Host Discussion
    Replies: 9
    Last Post: 29th Oct 2011, 11:16 AM
  2. Replies: 3
    Last Post: 28th Apr 2011, 12:28 PM
  3. Replies: 10
    Last Post: 27th Mar 2011, 05:06 AM
  4. HF remote upload
    By tut2tut in forum Technical Help Desk Support
    Replies: 8
    Last Post: 1st Mar 2011, 07:52 PM
  5. Replies: 7
    Last Post: 11th Jun 2010, 04:41 AM

Tags for this Thread

BE SOCIAL