Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by tibberous

  1. Are the all going to start with 'job'? Why use substr on the key on _GET or _POST? Something like... foreach($_POST as $key => $postvar){ if(!strcasecmp(substr($key, 0, 3), "job")){ list($firstpart) = explode('quest', $key); $firstpart .= "quest"; $$firstpart = $postvar; } }
  2. I have a page that needs to be able to send a file to an existing form as a post request. The form is on another site so I can't change it, I have to be able to send a post request with a file attached. Any ideas how to do this?
  3. I have a url, and want to see if it goes to a real page, and doesn't get a 404 or a redirect, what would be the best way to do that?
  4. I need a server-side way to save captured Flash data. Adobe want you to use their communication server but it is $4,500. I saw a solution that uses PHP, but it's $150. Does anyone know anything about this? Even a good tutorial would be great - Google seems to have really bad results for this.
  5. Yeah, theres a copy function. http://us3.php.net/copy You put in the path to your current image, then the path to where you want it to go. Was that what your asking?
  6. I got everything working except being able to turn a solid color into a transparent one. Anyone know how to do that?
  7. I have an image with two colors, black and white. I am trying to make the black transparent, and replace the white with a given color. Does anyone know how to do this? I tried $image = imagecreatefromgif("sheep.gif"); imagecolortransparent($image, imagecolorallocate($image, 0, 0, 0)); To try to make black transparent, but it doesn't seem to work.
  8. I'm not 100% sure, but I might have had this same error with fopen on external urls. Try making a PHP page with: <?php echo phpinfo(); ?> And visiting it in a browser. Go to where it has SERVER_NAME and make sure that is right. If it is wrong, some functions give errors and it can't be a bitch to fix because it's the last thing you'd think to check. If that isn't it, maybe post your code?
  9. Hello Lisa. I'm not sure what you asked but I would love to help you out. If you want to talk, my name on aim is tibberous1, or on msn tibberous@hotmail.com, or we can talk here if you prefer. Welcome to the exciting world of PHP!
  10. A computer virus could shut down the power supply for the whole country. That saves coal, which decreases greenhouse gases.
  11. I sent up a script with an ion cube protected header on my local server, and got the message "Your license key is not valid. Your license only supports one domain name, and no subdomains. If you like, you can purchase another license key for a subdomain." I know the domain name it's registered too, so I pinged it to get the server ip. I changed my hosts file so that the domains it is registered to shows up as 127.0.0.1. I made a test page that prints out $_SERVER and dies, it shows the HTTP_HOST, SERVER_SIGNATURE, and HTTP_HOST as what it should be. I then opened the script and set $_SERVER['SERVER_ADDR'] and $HTTP_SERVER_VARS['SERVER_ADDR'] to the ip string I got for the site. I still get the message! I don't know what other variables it can be using to see what domain the site is at - I even tried killing my internet connection. Is there a way I can somehow see what code is getting called? Or does anyone know of other ways the might be checking the domain? Anyway to attacked the encoded ion cube code? My only other approach is to delete the ioncube file, then try to use the rest of the script to see what was in there.
  12. IMO, it makes no real difference, until you get to Apache 2.2 which doesn't seem to work. I use 2.0 for local development. I'm not even sure what my server runs, thats how little it seems to matter
  13. I have a script that needs it's timeout value increased. It works if Timeout is set in the httpd.conf file, but the client wants it so it is only changed for that script, not site wide. Any idea how to do this?
  14. Yes. What do you mean "carry in the header fields"?
  15. Before anything else... if($_GET['activelocation']) setcookie('location', $_GET['activelocation'], time()+60*60*24*30);
  16. I'm not sure what your asking... Can you explain in general what your trying to do?
  17. $Status = "Up" is always true. You mean $Status == "Up"?
  18. I think only Firefox does that (IE doesn't anyway) - but I'm guessing that might be the problem.
  19. That, echo'ed out, showed up as the select button being checked. Only thing I can think to tell you is to view source and make sure thats right, and if you are using Firefox, close and reopen the page (don't refresh).
  20. I almost got this. Basically I am cleaning it with Tidy, cleaning it with str_replace and preg_replace, wrapping it in a root node and then parsing it as XML. Only think that is still giving me a problem is with html entities (&lt, &nbsp, &gt, ect). I replaced &nbsp with ' ', but I can't do the same thing for &lt because it will break my xml. Is there some way I can have the PHP XML parser ignore HTML entities? I thought about replacing & with a random string, then replacing it back, but it seems inefficient and tacked together.
  21. Big difference your looking at is javascript is client side and PHP is server side. PHP your guaranteed it will work, while javascript you have to worry about different browsers, and it still might never work. Javascript is nice though in that it is instantaneous, the user doesn't have to refresh the page. I'd do it with a mix of both, unless you just have a set amount of items and are not looking to let people do orders online.
  22. I have some html that looks like this. <body> <td id="top" align="center"> <div id="topNav">Rate PeopleMeet PeopleBest OfMeet Jim and James</div> <div id="userPanel"> <td> Login</td> <td>Join<br> HOTorNOT</td> </body> This html will always have the right amount of opening to closing tags. Basically, I just need the content from the inner cells. If a tag is nested, like <div>Outter div<div>Hello</div>text</div>, then I want the inner div to get the value Hello, and the outer div to get the value 'outer div text'. I'm not sure if I should use xml functions for this, or explodes, or preg_match and replace. Anyone know a good way to do this?
  23. Wow! Thanks! I didn't know [^<] was how you specified everything but <. I have no idea what s at the end does, or why this works, but at this point I'm just trying to get something to show the guy I'm working for. Thanks a ton!!
×
×
  • 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.