2,113 Posted Topics
Re: It seems ok but I don't see the form, so check if there is something different between field names and $_POST vars. Bye :) | |
Re: You need ffmpeg and ffmpeg-php extension which works only on linux and bsd, read here: [url]http://ffmpeg.org/faq.html#How-do-I-encode-single-pictures-into-movies_003f[/url] [url]http://sourceforge.net/projects/ffmpeg-php/[/url] bye. ![]() | |
Re: check here: [url]http://www.php.net/manual/en/[/url] there you can learn basics of PHP, search also for some tutorials, on google you can find tons of links, bye! :) | |
Re: Just a note, you can go a bit faster changing numbers with variables, a modified version of mikulucky: [code]<?php $a = 0; $b = 1; $c = 2; $d = 3; $endAmount = 100000; for ($i = $a; $i <= $endAmount; $i++) { if($i % $c != $b) { continue; … | |
Re: Have you tried routing? [url]http://codeigniter.com/user_guide/general/routing.html[/url] | |
Re: Which query, there are so many? o_o' Have you tried to run your queries directly in MySQL shell or via PHPMyAdmin? | |
Re: I can't really help you but I was reading here: [url]http://www.mathworks.it/products/new_products/webserver_discontinued.html[/url] Maybe you can use COM functions: [url]http://uk.php.net/manual/en/ref.com.php[/url] bye and happy new year! :) | |
Re: Both RSS 2.0 and Atom use GUID and ID to identify unique items/entries inside the feed, use those values associated with each source to check what you have already included. Bye :) | |
Re: Check these links: [url]http://phpxmlrpc.sourceforge.net/doc-1.1/ch05s02.html[/url] & [url]http://phpxmlrpc.sourceforge.net/doc-2/ch07s02.html[/url] (updated version) [quote]The constructor takes the following form: $msg=new xmlrpcmsg( $methodName, $parameterArray); $methodName; $parameterArray; Where methodName is a string indicating the name of the method you wish to invoke, and parameterArray is a simple Array of xmlrpcval objects.[/quote] where $methodName is 'execute' in your … | |
Re: From substr() manual: [quote]string substr ( string $string , int $start [, int $length ] ) If length is given and is 0, FALSE or NULL an empty string will be returned.[/quote] The problem is related to substr() on line 6, because strrpos() returns FALSE when there are no spaces: … | |
Re: Post the code. Bye. | |
Re: Set the charset meta tag to match server encoding. You need to set this value both in sending and in receiving page. Bye :) | |
Re: How these file are uploaded to server? FTP, WebDav, forms? How you have to send the files? As attachments or as download links? Second option, if you can, is preferable. Basically anyway, if you want to submit by forms, you have to build a proper form to upload files, use … | |
Re: If you check the headers of that link you will see that first time you download the file you get: [code]HTTP/1.1 200 OK Content-Type: text/html; charset=ISO-8859-1 Date: Tue, 20 Dec 2011 23:15:55 GMT Expires: Tue, 20 Dec 2011 23:16:55 GMT Transfer-Encoding: chunked Connection: Keep-Alive Set-Cookie: JSESSION_ID_hrly_data=G1zpTxXLBnKKK3jqXh0vpkJzh8VtkVcq1jPrjDNKtrcJ5kwv8nSm!1260773349; domain=.iso-ne.com; path=/; HttpOnly Set-Cookie: … | |
Re: Line 10, your input field has two name attributes, remove [icode]name="text"[/icode]. Bye. | |
Re: Check here: [url]http://office.microsoft.com/en-us/outlook-help/command-line-switches-HP001003110.aspx[/url] And: [url]http://uk.php.net/manual/en/ref.com.php[/url] Search for: new COM("Outlook.Application") php bye | |
Re: Man, change your database password! | |
Re: Check the headers you get with that link: [code]<?php $url = 'http://user:pwd@xyz.com/content.html?get1=x&get2=y'; print_r(get_headers($url,1)); ?>[/code] And then try to use cURL: [code] $useragent = "Mozilla Firefox ..."; # set valid user agent $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, $useragent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); $output … | |
Re: Each one of these [icode]nama_produk, harga, deskripsi, tgl_masuk, gambar[/icode] should refer to a field name in the form from which you send information to save, in the PHP script you need to use the $_POST array in order to connect them to variables: [code]$nama = $_POST['nama']; $harga = $_POST['harga']; $deskripsi … | |
Re: When you upload a file you need to move it from temporary directory to a directory of the server, so you can store the file, use move_uploaded_file(): [url]http://php.net/manual/en/function.move-uploaded-file.php[/url] And then change this line, it seems wrong: [code]$mail->AddAttachment('file:///H:/ha.txt','a.txt');[/code] with: [code]$mail->AddAttachment('h:/server_directory/files/ha.txt','a.txt');[/code] | |
Re: The platforms supported by ffmpeg-php are linux and bsd: [url]http://sourceforge.net/projects/ffmpeg-php/[/url] If you want to use ffmpeg in Windows first you need a porting, check here: [url]http://ffmpeg.org/download.html[/url] And then you can use ffmpeg in command line, with exec() function: [code]<?php exec("ffmpeg.exe -i video.avi video.mpg"); ?>[/code] bye | |
Re: @daniel you can use it to submit data to a script just as you're submitting a form, automatically. This script sends his request as a Firefox user, so it can bypass a filtering by User-Agent. But it becomes useless if the receiving script expects also a captcha or a CSRF … | |
Re: I made few tests. The first one is faster than the second, but still eats a lot of memory (~170MB in ~14 seconds): [code]<?php $file = '20111212realtime_gen.csv'; $f = fopen($file, "r"); $ln= 0; $nyc = array(); $millwood = array(); $hudvl = array(); $dunwood = array(); $arr = array('nyc' => array(23512,23513,23515,23516,23517,23518,23519,23520,23523,23524,23533,23534,23535,23538,23540,23541,23657,23660,23729,23770,23786,23810, … | |
Re: Exactly. The function time() gives you the number of seconds since 1970-1-1, so if you want to expire your cookie after a week write: [code]$time2=$time1+ (7 * 24 * 60 * 60); # days * hours * minutes * seconds[/code] bye. ![]() | |
Re: This is related to register globals*, you were using [icode]$text[$i][/icode], if you don't define variable $text, then you get an error: [code]<?php if(isset($_GET['check'])) { $sel_cars=""; $count=count($_GET['text']); for($i=0;$i<$count;$i++) { echo $_GET['text'][$i]." "; } } ?>[/code] Or use: [code] $text = $_GET['text']; echo $text[$i]." "; [/code] Bye :) * [url]http://php.net/manual/en/language.variables.predefined.php[/url] | |
Re: Try to simplify the problem, create an empty file, without MySQL, write: [code]<?php echo "<br>Tables were set up correctly."; ?>[/code] And see what it happens. Bye. | |
Re: A variable cannot start with a number, you have to use an alphabetic character instead, so $0 and $1 are wrong. For example use $a0 and $a1. Anyway, in your case a bi-dimensional array can be written as below: [code]$a = array( array(40,60,20), array(278,102,173) );[/code] To display data, then write: … | |
Re: The problem is related to the double quotes, rewrite that line 19: [code]$img = $info['photo']; echo '<img width="240" height="240" alt="Wonky Buildings" src="images/'. $img .'>';[/code] Or: [code]echo "<img width=\"240\" height=\"240\" alt=\"Wonky Buildings\" src=\"images/".$img ."\">";[/code] Or: [code]echo "<img width='240' height='240' alt='Wonky Buildings' src='images/$img'>";[/code] bye | |
Re: I agree with Ardav and Chrishea, also you never know who is trying to retrieve a password, and if I forget a password how should I remember a secret question and a related secret answer? If you don't want to deal with passwords, allow your users to log in with … | |
Re: Hmm.. Are you trying to save random charts? Why? [code]$url = 'https://chart.googleapis.com/chart?chid=' . md5(uniqid(rand(), true));[/code] | |
Re: If you can, use file command through exec(): [code]exec("file -b --mime-type $file");[/code] Or finfo_file(): [code]<?php $file = 'test.pdf'; $finfo = finfo_open(FILEINFO_MIME_TYPE); $result = finfo_file($finfo, $file); # echo mime-type finfo_close($finfo); ?>[/code] finfo_file(): [url]http://www.php.net/manual/en/function.finfo-file.php[/url] bye :) | |
Re: Use an absolute path: [code]<link rel="stylesheet" href="/site.css">[/code] | |
Re: I'm not sure to understand what you asking for but if you want an automatic and general execution maybe you can use something like: [code]# $stop: get value from db or file for this action if(date('d') == '01' && $stop == false) { # execute insert query }[/code] And run … | |
Re: Have you solved? You need to build a callback script, where you check if the value is already stored or not. In order to speed up you can build an index related to that column. Bye. | |
Re: If you can make an array with unix timestamp as key and post numbers as value you can do this: [code]<?php $a = array( '1322828101' => '500', '1322827133' => '450', '1322826151' => '360', '1322825391' => '200', '1322824530' => '180', '1322823000' => '100' ); foreach($a as $key => $value) { echo … | |
Re: With same CPU? In my opinion dedicated is better, because you don't have to share CPU and RAM with others. | |
Re: In both you need to use mysql_query: [code]$query=mysql_query($sql);[/code] ![]() | |
Re: You should not include two html headers in the same page. Just include the table. Is your main file a PHP file? What you get? | |
Re: Line 89, rewrite the query: [code]$sql = "INSERT INTO blog_users( blog_user_name, blog_user_password, blog_user_email, blog_user_access_level, blog_user_status) VALUES ( '$blog_user_name', '$blog_user_password', '$blog_user_email', '1', '$verification_code');[/code] And do the same on query of line 63, remove those curly brackets. bye :) | |
Re: Do you session_start() also on /abc/demo.php? ![]() | |
Re: Read this thread: [url]http://www.daniweb.com/web-development/php/threads/229549[/url] bye | |
Re: This is related to CSS not PHP. Which DocType are you using? Are you using z-index somewhere? Are you closing the div in head.php? Try to use [icode]display:block; position:relative; float:left; z-index:0;[/icode] in both divs, at this point you can use margin to set a distance between them. | |
Re: I don't understand. Which error you get? Can you post a simplified code example? ![]() | |
Re: Time stamps in mysql are saved in unix time, which is of seconds between the date you specify and 1970-01-01. In your query you can write: [code=mysql]SELECT fieldA, IF(strcmp(fieldB,'0000-00-00'),fieldB,'0') AS 'fieldB' FROM mytable;[/code] bye | |
Re: That scripts saves data to an sqlite db through Ruby, is not using PHP, so: what are you using? | |
Re: You can use mysqli_multi_query: [url]http://www.php.net/manual/en/mysqli.multi-query.php[/url] | |
Re: It seems this happens if the resource given sends an header with prefetch or next, just like you wrote: - [url]http://support.mozilla.com/en-US/kb/Firefox%20makes%20unrequested%20connections#w_link-prefetching[/url] - [url]https://developer.mozilla.org/En/Link_prefetching_FAQ[/url] bye | |
Re: You are missing form tags: [code]<form action="do_upload.php" method="post" enctype="multipart/form-data"> # your input fields here </form> [/code] bye |
The End.