2,113 Posted Topics
Re: Or just replace line 19 and 20 with this: [code]$page = isset($_GET['page']) ? $_GET['page'] : false; if($page != false)[/code] If you don't send page var through the link then $page is undefined and gives you an error. | |
Re: You can use pathinfo() to get the information: [url]http://php.net/manual/en/function.pathinfo.php[/url] [code]<?php $path_parts = pathinfo('http://remote.website/images/test.jpg'); echo $path_parts['dirname'], "\n"; echo $path_parts['basename'], "\n"; echo $path_parts['extension'], "\n"; echo $path_parts['filename'], "\n"; ?>[/code] but you still don't have a TempName because you're not uploading a file, if you need it, you should generate that on your own … | |
Re: This should work: [code]<Files about.html> php_flag engine off AddType text/html .html ForceType text/html </Files>[/code] | |
Re: Check also to dompdf: [url]http://code.google.com/p/dompdf/[/url] :) | |
Re: Go with Ubuntu Server and install Apache, MySQL and PHP. Here you can read the instructions: - [url]https://help.ubuntu.com/10.10/serverguide/C/index.html[/url] | |
Re: To display an image saved in the database you need to create a separate script. A basic example of display.php: [code]<?php header('Content-type: image/jpeg'); $case = $_GET['case']; $id = $_GET['id']; #check if $id is a number if(ctype_digit($id)) { require('db_conn.php'); switch($case) { case 'image1': $query = "select image1 from cms_content where id … | |
Re: It doesn't work for two reasons: 1. I don't see any id hidden input 2. image_filename and description (and id) are arrays Run this example: [code]<form method="post" action=""> <input type="text" name="id[]" value="9" /> <input type="text" name="image_filename[]" value="apples.jpg" /> <input type="text" name="description[]" value="apples" /><br /> <input type="text" name="id[]" value="10" /> <input … | |
Re: Check if your PHP configuration has PNG Support enabled. Just create a php file with phpinfo(): [code]<?php phpinfo();?>[/code] and call the file from the browser. In the GD section you should see something like in the attachment. Bye :) | |
Re: Check these links: - [url]http://glob.com.au/sendmail/[/url] (fake sendmail for windows) - [url]http://www.blat.net/[/url] Maybe you can configure your php.ini to work with this sendmail for Windows, just point the right path and do some tests. With Blat you can't use mail(), you should read the command line usage and use functions like … | |
Re: Maybe you need something like this: - [url]http://softwaremaniacs.org/soft/highlight/en/[/url] check the DEMO. As you see you can change styles and colors with no pain. Bye :) | |
Re: Remove quotes from NOW() and it will work: [code]"UPDATE users SET timp=NOW() WHERE username='$user'"[/code] | |
Re: Depends on your server configuration. If you can use PHP 5.1.6 or newer go with CodeIgniter, otherwise if you have PHP 4.3.2 or higher you can use CakePHP. They're both good but I prefer CodeIgniter, is simple to learn and the user guide is good as the community: - [url]http://codeigniter.com/user_guide/[/url] … | |
Re: I suggest you to read this: [url]http://codahale.com/how-to-safely-store-a-password/[/url] bye :) | |
Re: I've read the thread on SitePoint, try this: install on Firefox an addon called User Agent Switcher: [url]http://chrispederick.com/work/user-agent-switcher/[/url] then go to [I]Tools » Default User Agent[/I] and change it to Internet Explorer and check the page that gives you the problem. Let me know if the css still doesn't load. … | |
Re: Check this post: [url]http://ilovetypography.com/2007/08/19/identify-that-font/[/url] bye :) | |
Re: Not a person, there are spiders that surf the web only to collect email addresses.. and yes, there are some additional headers: [code]<?php $to = 'nobody@example.com'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, … | |
Re: Try get_headers(): [url]http://php.net/manual/en/function.get-headers.php[/url] bye :) | |
Re: If you have access to the command line you can use pdftotext: [url]http://en.wikipedia.org/wiki/Pdftotext[/url] use system() or exec() functions to convert the pdf contents into text, so you can store it. | |
Re: If you can send prints through a command line use system() or exec(). Bye :) | |
Re: After checking if empty you could use array_map() to trim, convert characters and so on... here's an example: [code=php] $_POST = array_map('strip_tags', $_POST); $_POST = array_map('htmlentities', $_POST); $_POST = array_map('htmlspecialchars', $_POST); $_POST = array_map('stripslashes', $_POST); $_POST = array_map('trim', $_POST); [/code] | |
Re: You don't need ImageMagick, SLIR requirements are GD library for image manipulation and PHP 5.1.0+ Are you using PHP and if yes, which version? | |
Re: Read this tutorial: [url]http://www.w3schools.com/php/php_file_upload.asp[/url] but you can find many more searching for [B]php upload tutorial[/B], bye :) | |
Re: I think you can use cURL to do that, you may change this script to make it work fine, it's just an example: [code=php] //retrieve data $curl = curl_init(); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_URL, 'http://twitter.com/statuses/user_timeline/foo.xml?count=2000'); curl_setopt($curl, CURLOPT_HTTPGET, true); curl_setopt($curl, CURLOPT_HEADER, false); $xmlRaw = curl_exec($curl); … | |
Re: Yes, you can setup a server on your own machine and test the applications you are interested in, personally I like [B]bugzilla[/B] because it has a good development community, but it is based on [B]perl[/B] not on php. In order to receive mails from the bug system you should setup … | |
Re: If you can display the text you can also display the name of the image that you upload for that author or book, you don't need a special search script, you need only a field for the image :) | |
Re: I use Moorte, a plugin for MooTools framework: [url]http://mootools.net/forge/p/moorte[/url] it's clean ;) | |
Re: Maybe it depends on double quotes in references row. Try it like this: [inlinecode]mysql_query("UPDATE company SET references = 'blah blah blah' WHERE company_id = 18");[/inlinecode] If you are using a $_POST['references'] then remove single quotes from it. This way: [inlinecode]mysql_query("UPDATE company SET references = $_POST[references] WHERE company_id = 18");[/inlinecode] | |
Re: Interesting thread but what's the situation now? | |
Re: Check your [b]hosts[/b] file. You can find it in c:\windows\system32\drivers\etc. Open it with notepad, and check if there is any of the websites you can't access. Bye :) | |
Re: Alternative to Lsmjudoka's solution: [code] <?php $a = '11-07-2009'; $b = explode('-', $a); echo $b[2] .'-'. $b[0] .'-'. $b[1]; ?>[/code] Maybe I'm wrong but, in this case, I don't see any advantage in using mktime() bye :) | |
Re: It isn't the same, he replaced double quotes with single quotes, check line 4. By the way, give us the error message you get from that code. Bye. | |
Re: In your CSS: @ line 4 add this rule: [B]text-align: center;[/B] so IE will center the div @ line 27 remove: [B]position: fixed;[/B] and add: [code=css]display: block; margin: 0px auto; text-align: left;[/code] Right after add a new rule for the form: [code=css]form { margin-top: 30px; }[/code] Bye :) | |
Re: Have you considered to use a CMS (Content Management System) as Joomla, Drupal o Wordpress? Bye :) | |
Re: Try VidShot Capturer 1.0: - [url]http://www.softpedia.com/get/Multimedia/Graphic/Graphic-Capture/VidShot-Capturer.shtml[/url] When you finish recording, you can use a converter to change the movie to flash format: flv. Or you meant to do it directly through a web page?! o_o | |
Re: Yet another function to display random images: [code=php] <?php function randomize() { $path = $_SERVER['DOCUMENT_ROOT'] . "images/"; $dir = isset($_SERVER['DOCUMENT_ROOT']) ? $path : NULL; $filez = glob($dir . "*.jpg"); shuffle($filez); echo '<img src="/images/' . str_replace($dir , '', $filez[0]) . '" />'; } randomize(); ?> [/code] $path is where you put … | |
Re: Firefox.. but you missed Konqueror, Epiphany, Flock, Dillo.. and Lynx! :D ![]() | |
Re: Maybe is too late, but read here: - [url]http://httpd.apache.org/docs/2.2/platform/win_compiling.html#projectcomponents[/url] In order to use htpasswd.exe you have to build apache from source. Bye :) | |
Re: Yep, I agree with jamshid and Sabia. To start the best thing you can do, it is trying to modify, or better, improve existing scripts. To do this, I'm sorry for you :P but you need to explore php.net as it is the best resource you can afford out there. … | |
Re: Your URLs have been blocked by the forum filter. We can't help you without your css code. Please paste the stylesheet or a link to an example online, so we can look it. P.S. sorry autocrat I didn't saw your reply =) | |
Re: You can learn to use sessions: - [url]http://www.php.net/session[/url] - [url]http://www.php.net/session_start[/url] Bye :) | |
Re: Download [b]Process Explorer[/b] and try to find out what is going on: - [url]http://www.microsoft.com/technet/sysinternals/Utilities/ProcessExplorer.mspx[/url] Then go to install a firewall, for our purpose you can use Zonalarm or whatever you prefer. You need a firewall to block and find out which processes are trying to connect to Internet. You can … | |
Re: And it's also the only [i]accessible[/i] way to do it. | |
| |
Re: In my opinion, the best thing you can do is to learn XHTML basics and CSS, so you can take control over your pages. You can do this without using Dreamweaver or any other WYSIWYG software. Jedit, NVU, Eclipse are all good, free and cross-platform. Bye :) | |
Re: Try to change "ForwardX11 no" to YES, in your ssh server. | |
Re: Hiya, I'm new here :) I've arrived here with a google train, in search of a method to limit or slow down brute force attemps. I agree with many of you, but I also think that we can only slow down an attacker. Best thing we can do is logging … | |
Re: Works fine for me. Have you seen this bug in other computers? Bye. | |
Re: Check the array. While function works fine to me. I have done it like this: [code=php] $names[] = 'name1@host.tld'; $names[] = 'name2@host.tld'; $names[] = 'name3@host.tld'; $x = 0; $y = 2; while ($x <= $y) { mail($names[$x], "hey", "whats up?"); $x++; }[/code] Bye. | |
Re: As stymiee said, you can do it. For example something like this: [code=php]<?php $d = date('w'); $maxim[] = 'sunday'; $maxim[] = 'monday'; $maxim[] = 'tuesday'; $maxim[] = 'wednesday'; $maxim[] = 'thursday'; $maxim[] = 'friday'; $maxim[] = 'saturday'; echo $maxim[$d]; ?>[/code] Just replace [i]'sunday, monday...'[/i] with your text. Bye :) |
The End.