How to partially download a remote file with cURL?
Is it possible to partially download a remote file with cURL? Let's say, the actual filesize of remove file is 1000 KB. How can I download only first 500 KB of it? ...
Is it possible to partially download a remote file with cURL? Let's say, the actual filesize of remove file is 1000 KB. How can I download only first 500 KB of it? ...
In my MySQL table, I have a column of TEXT type. On my HTML Form, user pastes text into it that might contain "" , ' ( ) and so on. I want to know how to safely execute Insert Query if these characters exist in the text and might crash the query execution. How to handle them properly in PHP? ...
I am using following code. When the query crashes, it is not displaying the ALERT that I defined in the "catch" block. <?php error_reporting(E_ALL ^ E_NOTICE); require_once("../Lib/dbaccess.php"); //Retrieve values from Input Form $CategoryName = $_POST["inCategory"]; $TotalMembers = $_POST["inTotalMembers"]; $D...
Hi all, PLATFORM: PHP, mySQL WHAT I HAVE: I have a Database table. Within my application, I am able to fetch all the rows. When I am querying the database, I have set the records fetch limit dynamically. WHAT I AM TRYING TO DO: I am trying to pull out all the rows of data until the record fetch limit is reached, in a loop. I want...
I want the DropDown text to be retained when the Form returns from POST. How to maintain the state? ...
Hi I'm creating a PHP website which involves users signing up, and I'm wondering about best practices for "email confirmation" codes. New users must confirm their email addresses - I do this by generating a code and sending it to the user in an email, which he can then use to activate his account. Rather than storing this key in a data...
I have the following code: public function createNewGuide($userID,$guideName) { $sql =" INSERT INTO myTable(name, updated) VALUES ('$guideName', 'NOW()')"; //Process query $this->query($sql); // This inserts the new row $this->query('LAST_INSERT_ID()'); // This throws an error return $this->query_r...
i have this simple loop: for($i=$_POST['position'];$i<count($myFiles);$i++) { $withoutNumber = explode("_",$myFiles[$i]); $noNr = unset($withoutNumber[0]); } my code editor is Aptana, and the problem is that when i write this code i get the unset keyword underlined like is an syntax error and i have no idea why that hap...
Hi i am using this class.upload.php for my project and i must say it is very helpful. However i am stuck with this error No correct uploaded source file. Can't carry on a process can anyone guide me how to solve the issue.Thanks here is the code where i think error lies..thanks <?php require_once('class.upload.php'); if((isset(...
Elliot Haughin wrote a lovely library for using the twitter api I got it up and running smoothly but I have an issue when using paged requests (cursors), for instance in statuses/friends. If I do this: $test = $this->twitter->call(’statuses/friends’, array(’id’ => ‘dennis_decoene’, ‘cursor’=>’-1′)); echo $test->next_cursor; I get “1...
I wan to increment a field value safely using php and mysql. what type of table/field must I use? is there a minimum version of MySQL I must use? what's the sql code for this, safe transaction for MySQL? ...
I created a small php script that returns a mysql result depending on given post/get parameters. With this file I can now use the jquery.post or .get command to retrieve something from my database. The script always returns 1 value. So I tried to make a javascript function that returns the retrieved value from the database. This is wha...
Hi all, i looking for your help please i use simple php code like: $file = $_SERVER["SCRIPT_NAME"]; //echo $file; $break = Explode('/', $file); $pfile = $break[count($break) - 1]; echo $pfile; than output $pfile e.g. fileforme.php but that i want is output of $pfile become fileforme because i want use it to: $txt['fl']= $pfile ; ...
if one web user is entering my php site and interacts with it then this php file will open one process (with one thread) and then after the php file is finnished with the logic and sent the output to the browser then the process is closed? cause if it wasnt closed then it would mean that the values in the variables in that php file will...
I have a hosting (hostgator) account with a master directory and multiple subdirectories, each representing a www address. I'd like to know if its possible to create an interface in php that would allow me to update a given file (say, header.php) in a specific folder (my custom wordpress theme which resides in each site) which will be th...
When I use ajax, I have to use mysql_query again to get information in that file which is for ajax. Can I do action without mysql_query like with include();? Ask if you don't understand, because I guess I asked not very properly. edited: When I try to reach ajax file, in that file I have to retrieve member information again. So, my ques...
Hi, I plan to develop a web directory system.(php used) But i don't know how to start the Data Base design. Are there any good books/tutorials about it? Thank you. ...
here is my code.... class line{ function db($host, $user, $pass, $db){ mysql_connect($host, $user, $pass) or die("Could Not Connect to Database or Database Does not Exists...."); mysql_select_db($db) or die("Database Does not Exists...."); } $idletime = 300; $deltime = 600; function test(){ ech...
I am looking for some way to code a function (I'm open to any language or library at this point) to take an already existing PDF file as input and return a modified PDF file that links certain words to different URLs. I know PHP and ColdFusion both have good tools for dealing with PDF's, but I haven't been able to find anything that wor...
I'm playing around with Django and have built my personal homepage in Django, but I want to use my wordpress blog as a path. For example if I want to path /blog/ in Django or in lighttpd so it will render the PHP wordpress site what is the best way to do that? I tested with proxy.server in lighttpd with no luck - it seems like Django ...