Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tibberous

  1. Yeah you have to add index.php in the conf file, then restart apache. It's just index.html and index.html.var by default. Open httpd.conf, file the line with DirectoryIndex, and change it to: DirectoryIndex index.php index.htm index.html
  2. Your missing a double-quote: $stringData = "$text;
  3. Actually I just fixed it by making a symbolic link. Not sure what made me think of it, since I'm normally a Windows man. I'll still try your way though, after 8 hours of sleep...
  4. I am trying to make FLV files made by the Red5 server to show up on my site. Sadly, the Red5 server is really hard to do anything with, and not really used by anyone other than me. After many hours of trying to change the output path, I am just trying to somehow compensate. If I have a folder full of files, on a random linux directory, how can I serve them through Apache? Any ideas?
  5. Meta refresh is slower and doesn't work as well. It screws up the back button too.
  6. Change it to: header("Content-Type: image/png\n\n"); Tested and works.
  7. I never use them, just because I think they are a setting in the config file that could conceivably turned off. If they were to do it again, I think they should have used <? instead of <?php, but not that <?php is what you always see, I think <? kind of looks like asp.
  8. I am trying to use cURL to simulate a multipart form post (ie: a file upload). After days of searching I almost have it. $url = "http://127.0.0.1/die.php"; $ch = curl_init($url); $postData = array(); //simulates <input type="file" name="file_name"> $postData['file_'] = "@C:\\Apache\\Apache2\\htdocs\\choose.png"; $postData['submit'] = "UPLOAD"; curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData ); $ret = curl_exec($ch); echo curl_error($ch); curl_close($ch); echo $ret; The only problem is that cURL doesn't take relative paths! I have to give it a full path. This makes it pretty horrible portability wise. Does anyone know a way to fix this? Or is there a PHP way of taking a local file path and making it full?
  9. Just make up something. Your boss is obviously an idiot, so it won't matter what you say to him, it will all be in how you say it to him. Don't be argumentative. Or, if it's far along, see if you can get him to take an answer like, "maybe after we do X", then never do it.
  10. If you don't control the destination script, like haveing a script send a picture to photobucket.
  11. Without using upload. If I have a file on the server, can php send it to another php script as post data?
  12. Depends on the merchant.
  13. $money = explode(".", $money); $money[1] = substr($money[1], 0, 2); $money = $money[0] . "." . (strlen($money[1]) < 1 ? "0" : "") . (strlen($money[1]) < 2 ? "0" : "");
  14. He's right. My voice recorder uses Flash and java. I am working on a solution to let people write this with only Flash and PHP. From the client end you need Flash, ActiveX, or *maybe* java. You want Flash.
  15. The first thing you will need to do is make the page where he registers. Basically, you need to store his name and password somewhere. You could also store his links now, or you can let him add them later. So, make a page called register.php. In this page, make an html form with at least two inputs and a button. Make this form submit to itself, and check to see if it gets any inputs, and if it does, store them. How you store them is up to you, basically either a file or database, with database being the right way to do it.
  16. Thanks. I was looking to be able to send a file though - simulating a file upload. Any idea how I would add a file to the page request?
  17. Use strip_tags. $username = strip_tags($_POST['username']);
  18. No. There is nothing on that page that helps me, it is what I would get if I did an "I feeling lucky"... and wasn't.
  19. How do you post a file to a form with curl?
  20. I might be able to round up some thumbnail code for you, but unless your site gets like 10 visitors a month, you want to cache thumbnails. Just after you make the image, store it in a folder, and then pull from the folder.
  21. Wow, you have the worst host ever. Use bluehost, there good guys - sat on the phone with me for 40 minutes getting Tidy to work. Cheap ($100/year), great packages (server is a little slow) - bluehost.com
  22. $check_name = mysql_query("SELECT * WHERE item_name = '{$_POST[$item_name]}'");? Everyone needs to turn there register globals back on.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.