Results 1 to 10 of 24
-
9th Jul 2011, 03:30 PM #1OPBannedWebsite's:
WarezRelease.org ThatHosting.coRemote 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='<a href="$siteURL/$uploadDir/$img"><img src="$siteURL/$uploadDir/$img" border="0"></a>' onclick='this.focus();this.select();' /></p>";
}
}
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
-
9th Jul 2011, 03:41 PM #2Respected 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.
-
9th Jul 2011, 04:22 PM #3OPBannedWebsite's:
WarezRelease.org ThatHosting.costill the same.
-
9th Jul 2011, 04:32 PM #4Respected Developer
From above code replace this line
PHP Code:htmlspecialchars_decode("<a href=\"$siteURL/$uploadDir/$img\"><img src=\"$siteURL/$uploadDir/$img\" border=\"0\"></a>")
PHP Code:html_entity_decode("<a href=\"$siteURL/$uploadDir/$img\"><img src=\"$siteURL/$uploadDir/$img\" border=\"0\"></a>",ENT_QUOTES)
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.
-
9th Jul 2011, 04:44 PM #5OPBannedWebsite's:
WarezRelease.org ThatHosting.cono change.
-
9th Jul 2011, 05:06 PM #6Respected MemberWebsite's:
DL4Everything.com Soft2050.inCould you please output what you are getting ??
-
9th Jul 2011, 05:13 PM #7
-
9th Jul 2011, 05:18 PM #8Respected 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.
-
9th Jul 2011, 05:42 PM #9Respected MemberWebsite's:
DL4Everything.com Soft2050.inActually, the code mRaza gave should fix the main problem
But theres a problem in that:
PHP Code:<img src='$imgname' alt='Uploaded image'></a>
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>";
}
}
-
9th Jul 2011, 10:21 PM #10OPBannedWebsite's:
WarezRelease.org ThatHosting.coThanks 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.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Want to know about remote upload!
By xps15z in forum File Host DiscussionReplies: 9Last Post: 29th Oct 2011, 11:16 AM -
filesonic not pass between them and the fileserve remote file upload to upload the ot
By uvb76 in forum File Host DiscussionReplies: 3Last Post: 28th Apr 2011, 12:28 PM -
Torrent upload in Shareflare.net. High-speed remote upload on the server
By Shareflare in forum File Host DiscussionReplies: 10Last Post: 27th Mar 2011, 05:06 AM -
HF remote upload
By tut2tut in forum Technical Help Desk SupportReplies: 8Last Post: 1st Mar 2011, 07:52 PM -
FileMo - $10 for 1000 downloads - Remote Upload - Huge Upload limit - All Countries!!
By awaisuk in forum Affiliate Programs PromotionReplies: 7Last Post: 11th Jun 2010, 04:41 AM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...