TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-04-2008, 10:21 PM   #1 (permalink)
The Contributor
 
Join Date: May 2008
Location: Iran
Posts: 53
Thanks: 33
Yoosha is on a distinguished road
Help 4 basic questions

Hi,
I have 4 questions:

1- Where i can find function for RGB2Hex/Hex2RGB(Complete)?

2- How can i fix this error:
The Apache service named reported the following error:
[Mon Jun 23 21:32:08 2008] [Notice] [Disabled use of AcceptEx() WinSock2 API.]

3- Also, how can i fix/handle this:
Warning: Unknown: POST Content-Length of 5906500 bytes exceeds the limit of 5242880 bytes in Unknown on line 0
Warning: Cannot modify header information - headers already sent in Unknown on line 0

4- What is diffrence between HTMLEntities V.S. HTMLSpecialChars

Thanks for help ;).
Send a message via Yahoo to Yoosha
Yoosha is offline  
Reply With Quote
Old 09-04-2008, 10:47 PM   #2 (permalink)
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

php Code:
function toHexFromRGB($iRed, $iGreen, $iBlue)
{
    return sprintf('%06X', $iRed . $iGreen . $iBlue);
}

function toRGBFromHex($szHex)
{
    $aRGB = array();
   
    for ($iIndex = 0; $iIndex < 3; $iIndex++)
    {
        switch ($iIndex)
        {
            case 0: $szKey = 'red'; break
            case 1: $szKey = 'green'; break;   
            case 2: $szKey = 'blue'; break
        }
       
        $aRGB[$szKey] = hexdec(substr($szHex, (2 * $iIndex), 2));
    }
   
    return (object) $aRGB;
}

$pRGB = toRGBFromHex('00FFEE');

printf
(
    "Red = %s<br />Green = %s<br />Blue = %s<br />Hex = %s",
    $pRGB->red, $pRGB->green, $pRGB->blue,
    toHexFromRGB(255, 0, 0)
);
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote
The Following User Says Thank You to Wildhoney For This Useful Post:
Yoosha (09-06-2008)
Old 09-05-2008, 09:36 AM   #3 (permalink)
The Contributor
 
Join Date: May 2008
Location: Iran
Posts: 53
Thanks: 33
Yoosha is on a distinguished road
Default

And 2, 3, 4?
Send a message via Yahoo to Yoosha
Yoosha is offline  
Reply With Quote
Old 09-05-2008, 12:22 PM   #4 (permalink)
The Reckoner
Advanced Programmer Top Contributor 
 
Karl's Avatar
 
Join Date: Sep 2007
Posts: 437
Thanks: 22
Karl is on a distinguished road
Default

2, I don't know.
3, Increase the POST length in php.ini
4, the only difference between htmlspecialchars() and htmlentities() in PHP - SitePoint Forums
__________________
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
Karl is offline  
Reply With Quote
The Following User Says Thank You to Karl For This Useful Post:
Yoosha (09-06-2008)
Old 09-05-2008, 01:46 PM   #5 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Apache :: Disabled use of AcceptEx WinSock2 API

first result of a google search for "Disabled use of AcceptEx() WinSock2 API"
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
The Following 2 Users Say Thank You to sketchMedia For This Useful Post:
Wildhoney (09-05-2008), Yoosha (09-06-2008)
Old 09-06-2008, 03:38 PM   #6 (permalink)
The Contributor
 
Join Date: May 2008
Location: Iran
Posts: 53
Thanks: 33
Yoosha is on a distinguished road
Default

Thanks all. Resolved.
Send a message via Yahoo to Yoosha
Yoosha is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:34 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design