Jump to content

Splash

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

About Splash

  • Birthday 03/02/1987

Profile Information

  • Gender
    Male
  • Location
    London

Splash's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I've been struggling with this for a while now so hopefully someone can help me out. I need to use regex to replace all spaces inside an anchor tag for example. Hello this is a string, check this <a href="http://www.google.com">Google is cool</a> Oh and this <a href="http://www.google.com/blah blah">Google is cool</a> That is all Needs to become Hello this is a string, check this <a[sPACE]href="http://www.google.com">Google[sPACE]is[sPACE]cool</a> Oh and this <a[sPACE]href="http://www.google.com/blah[sPACE]blah">Google[sPACE]is[sPACE]cool</a> That is all Thank you
  2. Hiya, I have a page that contains a number of 100% width tables. When I print the page the 4th table gets spit between two pages. How can I change this so that if the page ends half way through a table it pushes the whole table to the next page? Thank you for your help!
  3. Perfect thanks tallship
  4. Figured this out. Needed to do it as a string. e.g. $url = 'http://foo.com/'; $params = 'name=test&age=24&preferences[]=1&preferences[]=2&preferences[]=3&preferences[]=4&preferences[]=5&preferences[]=6'; $user_agent = "Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); if(curl_exec($ch) === false) { echo 0; } else { echo 1; } curl_close ($ch);
  5. Hi all, I'm trying to send some data to a remote domain but am having an issue with one of the variables being an array. The problem is that the preferences array loses it's individual values at the other end. Any idea what I'm doing wrong here? $url = 'http://foo.com/'; $params = array( 'name' => ' Test', 'age' => 24, 'preferences' => array(1,2,3,4,5,6) ) $user_agent = "Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)"; $ch = curl_init(); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS,$params); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); if(curl_exec($ch) === false) { echo 0; } else { echo 1; } curl_close ($ch);
  6. Hiya, I'm trying to zip a directory using the following command: zip -r0 zipfile mydir However there's a file I get an error on whilst the zipping takes place. This causes the command to stop. Is there any way to tell the command to skip errors? I've tried 'man zip' but I can't find anything. thanks
  7. Thanks Salathe, I've already had a look at that but can't find any practical examples to work from. Would you mind giving me an example with explanation?
  8. Hiya, I've using mod_rewrite to run all URI requests through a PHP file (siteRun.php) However I need to stop this from happening in a particular sub directory. How can I achieve this? RewriteRule !\.(gif|jpg|php|png|css|js|swf|ico|flv|pdf)$ /siteRun.php RewriteRule ^(.*)subdir/(.*)$ /wordpress/$2
  9. Not sure if it's the cause of your problem but your constructor should start with 2 underscores.
  10. Splash

    PHP mail

    The PHPMailer class is perfect for this: http://sourceforge.net/projects/phpmailer/
  11. Also there are a number of security issues involved when mailing form data. The following link talks through these and tells you how to protect against them. http://www.velvetblues.com/web-development-blog/how-to-write-a-php-contact-form/
  12. Hi Rockindano You'll need to add all your variables into the message parameter. i.e. $message = $name."\n"; $message .= $email."\n"; $message .= $phone."\n"; etc
  13. Hiya, I'm having a problem that I hope someone can help me with. I've got a quicktime upload form which includes fields for the videos width and height. However it seems that most users don't understand this and are entering 0 and 0. What I need is to get the videos dimensions using PHP. Does anyone have experience with this or know how it could be done. Thank you.
×
×
  • 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.