Upload Form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

Upload Form

Post by Maluendaster »

Hello all, i want to make a form that can upload at the same time to rapidshare.de and megaupload.com , and then give me the links to download the file... how can i do this???

thank you....
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

Post by Maluendaster »

Anyone can give a an advice on this???
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

There was an upload class that I wrote posted here recently. If you want an example of how to use it I can provide one.
(#10850)
Maluendaster
Forum Contributor
Posts: 124
Joined: Fri Feb 25, 2005 1:14 pm

Post by Maluendaster »

arborint wrote:There was an upload class that I wrote posted here recently. If you want an example of how to use it I can provide one.
thank you, but that's too complicated for me right now, i was looking for something more simple....
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Code: Select all

// include the files

		$upload =& new A_Http_Upload();
		if ($upload->fileCount() > 0) {
			if ($upload->isUploadedFile()) {
				$filename = $upload->getFileName();
				if ($upload->moveUploadedFile()) {
					$content .= "<p>The file <b>$filename</b> has been uploaded successfully.</p>";
				} else {
					$content .= "<p style=\"color:red;\">An error occured uploading $filename.</p>";
				}
			} else {
				$content .= "<p style=\"color:red;\">Error with uploaded file.</p>";
			}
		} else {
			$uploadform =& new A_Http_UploadForm($upload);
			$content .= $uploadform->form('myform.php');
		}
		echo $content;
(#10850)
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

what he wants to do is at the same time much simpler and much more complicated. he wants to input a file and send it to 2 free upload sites for upload. what he also wants to do is then get the dynamically generated links. which IMO is gonna be fairly difficult without reading in the resulting upload pages and doing like a preg search for the links. maybe jsut make a plain old html page that has one input, pubmits it to 2 sites and loads the sites in a page with 2 frames.....
Post Reply