| | Hi all i want make one form whit php , when users submit there urls , then my site give one picture form url and save on my host ! how can do that ? thanks |
| Nov 8, 2009 |
The problem in the getin.php file is that you have html before you tried to send the cookie. If you do that you'll get an error. Try movie everything above the html and then placing the variables where you want them in the html.Example:CODE<?phpinclude "config.php";$username = $_POST['user'];$password = $_POST['pass'];$result = MYSQL_QUERY("SELECT * from news WHERE username='$username'and password='...
read more.
Hi all i want make one form whit php , when users submit there urls , then my site give one picture form url and save on my host ! how can do that ? thanks I'm sorry, but I'm not exactly sure what you mean. I've gotten this far: You want a form that people can enter urls into. But what do you want to do with it afterwards? Do you want to save the url in a text file or data base? Are the urls links to images that you want to save? Please try to be more clear in your request, and I'll do my best to help you with it.
No no ,
I want make one form , and then peoples come and post there url when people send url by this form i want make one code to give url of website and gete picture form site look's like this at first i post my url in page 2 - the page give one picture form my site and save in host 3 - show the thats picture form my host i want make this script to help gave pic form url i want make this script for buy and sale templates so , users login at site then post there url ( for exam : http://yoursite.com/index.htm) then my script must give one picture form index.htm and save in my host at mysite/picure/httpyoursite.comindex.htm.jpg thanks if you know some think about this project tell me please ,
Hi mr gaea
do You have an Idea for this project ? I have 2 choose : 1 - Tell Users To Take Picture form Web and Upload 2 - Make one PHP robot how you think about this project ? This project is web template sale Script , plz help me and guide me thanks ,
farsiscript,
Best advise I can give you is to search for this script on the free sites like www.hotscripts.com. If you want to learn some php in the process, there is a book written by Larry Ullman that includes the source code for a nearly identical application (log-in/log-out, registration, and error-checking functions) but you would still have to know some php to personalize it. The name of the book is "PHP and MYSQL for Dynamic Web Sites, Second Edition". Chapter twelve has the application you want. Check your Local Library. Hi mr gaea do You have an Idea for this project ? I have 2 choose : 1 - Tell Users To Take Picture form Web and Upload 2 - Make one PHP robot how you think about this project ? This project is web template sale Script , plz help me and guide me thanks , Sorry for the late reply, i've been really busy with my finals. Both of those solutions would work, but the easier version would deffinatly be number 2. How much php do you know? I can give you the basic code you'll need for each...but you really should customize it for your individual purposes. Anyways, for #1 you'd have a form that asks for the url of the photograph. You should really insert some error checking to make sure that it is infact an image (.jpg, .gif, or .png) instead of an exicuitable. The code would look something like this: CODE <?php (take from http://damonparker.org/blog/2005/09/29/dow...ile-using-php/).function http_get_file($url) { $url_stuff = parse_url($url); $port = isset($url_stuff[‘port’]) ? $url_stuff[‘port’]:80; $fp = fsockopen($url_stuff[‘host’], $port); $query = ‘GET ‘ . $url_stuff[‘path’] . ” HTTP/1.0\n“; $query .= ‘Host: ‘ . $url_stuff[‘host’]; $query .= “\n\n“; fwrite($fp, $query); while ($line = fread($fp, 1024)) { $buffer .= $line; } preg_match(‘/Content-Length: ([0-9]+)/’, $buffer, $parts); return substr($buffer, - $parts[1]); } ?> You'd then take the binary value that is returned, and write it into a file. As far as #2 goes, there are lots and lots and lots of tutorials out there about how to make an image upload form. I find that htmlgoodies is usually a good resource for those first learning how to code. Check out their version of the tutorial at: http://www.htmlgoodies.com/beyond/php/article.php/3472551 The one problem that i can find in that code is it doesn't check the file extention either. If you have any more questions please feel free to post again.
Hi Dear gaea and other friends
thanks about your help i find this script and i thing i posting here to help u : for storing image in sql without upload on hositng i think storing image in sql is better uploading : at first make form.htm : " with this file you can post image QUOTE <form action="sql.php" enctype="multipart/form-data" method="post"> <input type="file" name="image" /><br /> <input type="submit" name="upload" value="Upload" /> </form> at 2 make sql.php : QUOTE <? // check wether the user pressed the upload button if(isset($_POST['upload'])){ // below two lines connect to mysql and the mysql database // change it according to your information mysql_connect("localhost", "root", ""); mysql_select_db("img"); // below line opens the file chosen in the form for reading only $file = fopen($_FILES['image']['tmp_name'], "r"); // then we read the file and add slashes to prevent errors when submitting to mysql $image = addslashes(fread($file, filesize($_FILES['image']['tmp_name']))); // inserts the null value as id, and our defined var $image to their corresponding cols. // we use die(mysql_error()) as a error report if something screws up mysql_query("insert into images values('null', '$image')") or die(mysql_error()); // if all goes well, echo the below line. echo "image uploaded successfully"; } ?> at 3 make view.php : " this file show images form sql QUOTE <? // changes our url id to the var $id $id = $_GET['id']; // connects to the database //change info accordingly mysql_connect("localhost", "root", ""); mysql_select_db("img"); // selects the binary data blob according to the id specified // by our url $result = mysql_query("select image from images where id = '$id'"); // tells php that contents of this page will be an image header("(anti-spam-content-type:) image/jpeg"); // echoes our mysql query (echoes out the blob data) echo mysql_result($result, 0); ?> How To show images : you can user this code : <img src="view.php?id=1" alt="" /> for example if i browse view.php?id=2 then i can view 2 image in sql with this script you can make secure (right click,save) image gallery or dont upload images upload in host is not good , but storing data in database is very fast and secure but my script has one problem i want make filter to members can not upload zip file or php file or an other file . i think with javascript i can do that but plz help me thanks all
Glad you found what you were looking for
Sometimes it's not a good idea to make the link of the picture intact with your site. I mean, think if somehow anyone post a annoying picture? maybe you should analyze the pictures first.
Anyway, if you want to convert the url into just txt, just use htmlentities(). It will discard the function of all HTML tags, so it won't do any HTML commands.
how can i analyze picture format
i want make one soruce to analyze picture format and if picture is in jpg format then accept image else send message to visitor (not good file format ) some think like this end if i think i do that whith javascript in form tag thanks dear gaea , you and other firends here are nice programmer and good friend if you find some kind of script plz post here dear .hack//GU plz paste htmlentites () here with one sample thanks , i tray to search htmlentites () in www.php.net thanks all Latest Entries
The problem in the getin.php file is that you have html before you tried to send the cookie. If you do that you'll get an error. Try movie everything above the html and then placing the variables where you want them in the html.
Example: CODE <?php include "config.php"; $username = $_POST['user']; $password = $_POST['pass']; $result = MYSQL_QUERY("SELECT * from news WHERE username='$username'and password='$password'") or die ("Name and password not found or not matched"); $worked = mysql_fetch_array($result); if ($worked) { $username = $worked[username]; $password = $worked[password]; $email = $worked[email]; setcookie( "user", "$user", time()+3600, "/", "", 0 ); } ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <?php if($worked) { echo "Welcome $username! Your e-mail address is $email"; } ?> </head> <body> </body> </html>
no body loves me
i find this code for get html page soruce and save in sql : CODE <?php $fd = fopen ("http://www.yoursite.com/index.htm", "r"); while (!feof ($fd)) { $buffer = fgets($fd, 4096); echo $buffer; } fclose ($fd); ?> you can use this code to get page source , i write this code for sale template script you can send $buffer to sql or print at page or ....
hi
i search with google and i find this code : CODE function mkcookie($cookiename,$cookievalue,$cookietime){ setcookie( "membership", "farsiscript"); echo $_COOKIE["membership"]; echo $HTTP_COOKIE_VARS["membership"]; } but my problem is : i can not check cookie in test.php file , i use this code : CODE <?php if (isset($_COOKIE['membership'])) { echo"in"; exit; } else { echo" out"; exit; } ?> what code i must use to check my cookie ? thanks , i need your help
Similar Topics
Keywords : request, php, submit, script, save, host, picture, form, url
(3) make an index.php copy and paste this code CODE $db_host = "localhost"; $db_user = "root"; (5) Ok so i'm still working on the forum software i posted about a while back, but I have no idea (2) I am looking for: freeware php quess the person in the photo game script.... (5) I'm not sure if this is the right place to post this but I really need help in installing the while being hosted with ComputingHost (6) I am not new to programming. I want to create a form to add some values into my tables, the code (0) Hello, I'm looking for a download script for sound files (e.g. mp3, avi, wma, and other ones). (12) Ok, what I am trying to do is this. Re-direct a domain name called: avalon.asn.au to (3) Hello, i'm wanting to start making my own forum software but i dont know where to start or what $_GET/POST/REQUEST? (2) alright, so heres me again (theres probably a contact page on the website but I figure somebody (3) I plan on making a script for basic voting between different options, and I'd like to know what Where? (6) Hello, everyone. Anyone knows where I can get a library script that acts like CMS script software, I don't know why. (6) For some reason my random string script is not working. I got a fatal error when I tried it under A fault I cannot spot in PHP (3) Hi, when running a PHP script I keep getting the error: QUOTE Notice: Undefined variable: bret (4) I've been looking all over the net for a PHP script which can provide an interface to browse a php linking script ?p= (5) hi i'm not that great at php so i'm not to sure if this will work or not. but what i want to (15) Yes, yes. I have another script that I have written and I am distributing. I am not entirely sure if This is a very simple online now script. (4) Hi all, Its Aldo. anyways, I wont be using the method of pagination, i will just tell you how to script help needed (5) Hi I am trying to make a script so that i can insert songs into a playlist, but i need a script in post here and get free script (15) Hi everybody sorry if i posting here , i know I want design free PHP script and i dont know the official wap download script (3) By downloading this script you are agreeing to the license and terms outlined below /biggrin.gif" Any Suggestions? (7) Any free auction script suggested? I want it to be as many practical functions as possible, yet old version of my wap chat script :-) (15) here is a very old version of my wap chat script, its not very advanced but has privates, smileys found it on the net (39) This script was found on the net http://tips-scripts.com/?tip=watermark#tip B&T's Tips & (11) Hello, I've one registration page where the users fills in their information, is it possible to php parse error when running script (4) Hi. I've just created a php script. The main object of the script is to delete some old files Trying to post a value with using a submit button (11) Hey me again. Looks like im having trouble with php. THis time the solution should be easy but i how to make news script that uses MySQL writen in PHP (20) How to make a News script with PHP + MySQL So..in this tutorial i will explain how to create PHP A one file script! (6) This scripts is so simple, you dont need to edit ANY of it! All you have to do is make a folder (18) Hi I find many sites has PHP scripts :: QUOTE http://www.proxy2.de/scripts.php Looking for request, php, submit, script, save, host, picture, form, url
|
![]() Request: Php Submit Script With Save In Host - Get Picture form url |
Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com