Jump to content

LeadingWebDev

Members
  • Posts

    79
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Israel

LeadingWebDev's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. class picOutline { function picOutline($opts=array()) { $this->imageUrl=$opts['imageUrl']; $this->borderColor=$opts['$borderColor']; $this->link=$opts['$link']; $this->altText=$opts['$altText']; $this->width=$opts['$width']; $this->height=$opts['$height']; $this->align=$opts['$align']; } Function Set($varname,$value) { $this->$varname=$value; } Function displayImage() { if ($this->link) { echo "<a href='".$this->link."'>"; } echo "<img src='".$this->imageUrl."' "; if ($this->borderColor) { echo "style='border: 1px solid ".$this->borderColor.";' "; } if ($this->width) { echo "width='".$this->width."' "; } if ($this->height) { echo "height='".$this->height."' "; } if ($this->altText) { echo "alt='".$this->altText."' "; } echo "align='".$this->align."' />"; if ($this->link) { echo "</a>"; } } } HTH
  2. The run is spent may be cause of big result sets are returned. as bigger arrays u store -> more ram u need to store them. or you may have an infinite loop, but i didn't really checked the script as i am on the work i suggest using 1 or 2 queries for all those stuff you retrieve and retrieve only needed information with limit, joins, etc.
  3. wrong identification information supported or database server refusing connection for supported user.
  4. that all depends on usage of field in ur case. if u are planing to use later 'IN' inside ur query on a field u want to store implode(',',$var) perhaps this will be more relevant for you, otherwise if u gonna preform searches/filters on this data it is better to separate to few fields.
  5. few short is better, than one long that will perform full text search in a bad case of using.
  6. get_browser can support you with major version as minor as well.
  7. if it is remote server, use fgetc() then eval() on code u received, if it is located on same server u are working on, user require_once if the files is critical for you, otherwise include_once hth
  8. no, Regular Expressions loads server hard. If u are building statistics that shouldn't catch crawlers (web search spiders) probably get_browser will help you, as every search bot have his own user agent.
  9. <?php echo $_SERVER['HTTP_USER_AGENT'] . "\n\n"; $browser = get_browser(null, true); print_r($browser); ?> should help you, but remember you should configure it on server and support him browser list. Reference: http://php.net/manual/en/function.get-browser.php
  10. This does not following redirect, htaccess should redirect u to index.php in this directory. However htaccess maybe returns u the http 302 or 301, you should setopt follow location. try putting curl_setopt($clean_url_check, CURLOPT_FOLLOWLOCATION, TRUE); to debug the response u receive from server, send him POST request and echo result, rather than sending GET. HTH
  11. $s=''; foreach(explode("\n",trim(chunk_split($string,2))) as $h) $s.=chr(hexdec($h));
  12. First of all, i already see a vulnerability there. Filter visitors email with filter_var, as you create a header with and it is vulnerable to external attacks. for vulnerability explanation read : http://www.php-security.org/MOPB/MOPB-34-2007.html $headers .= "\nSubject: Resume from the 'Careers' page"; $message = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 8bit\n\n" . $skills . "\n\n" . $name . "\n\n" . $phone . "\n\n" . $email . "\n\n";
  13. Andy, you can try using timestamp
  14. SELECT date_format(dataFIELD, %e/%m/%Y) as datefield FROM `table` WHERE 1=1
×
×
  • 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.