- http://php-http.com/Upload_Images_to_TinyP...trieve_the_URLs -
<?php include 'phpWebHacks.php'; $h = new phpWebHacks; /* tinypic.com */ $h->get('http://tinypic.com'); /* get the hidden fields */ $form = $h->parseForm('uploadform', &$action); /* filetype = image, resize = default */ $form['file_type'] = 'image'; $form['dimension'] = '1600'; /* 'browse' the image to upload */ /* submit */ $page = $h->post($action, $form, $file); /* It will show a 'click here to view the image' page and then redirects using javascript. Since javascript is not supported, we need to manually parse the URL */ /* get the result page */ $page = $h->get($url[1]); /* here is your URL */ ?> <form method="post" enctype="multipart/form-data" name="uploadform" action="<?php echo $_SERVER['PHP_SELF']; ?>"> Enter path to file: <input type="file" name="filename" /><br /> <input type="submit" name="sub" /> </form>
Czemu nie działa?
Errory:
Kod
Warning: fopen(.log/headers.txt) [function.fopen]: failed to open stream: No such file or directory in [...]\phpWebHacks.php on line 69
Warning: fputs(): supplied argument is not a valid stream resource in [...]\phpWebHacks.php on line 70
Warning: fclose(): supplied argument is not a valid stream resource in [...]\phpWebHacks.php on line 71
Warning: fputs(): supplied argument is not a valid stream resource in [...]\phpWebHacks.php on line 70
Warning: fclose(): supplied argument is not a valid stream resource in [...]\phpWebHacks.php on line 71
Domyślam się że chodzi o plik headers.txt, ale skąd go wziąć?