• <div style="color: <?=$random_color?>">    테스트 텍스트</div>위 코드의 color에 php에서 랜덤으로 생성된 컬러 코드 값을 넣으려면 어떻게 해야 하나요
    2016.07.11 22:51:44
    • 1
      답변수
    • 1
      반응수
    • 6.9k
      조회수
    • 0
      투표
  • OS와 브라우저에 따라 PHP 코드에서 다른 조건을 작성하려 합니다.PHP에서 요청하는 OS 및 브라우저 정보를 알려면 어떻게 해야 하나요
    2016.07.11 22:43:25
    • 1
      답변수
    • 1
      반응수
    • 5.1k
      조회수
    • 0
      투표
  • 안녕하세요~새로고침 없이 디비에 있는 데이터를 실시간으로 가져오고 싶습니다.굳이 실시간이 아니더라도 1분마다 서버를 호출해서 데이터를 가져와 출력해주어야 하는데어디서 부터 시작해야 할까요?
    2016.06.13 00:31:55
    • 2
      답변수
    • 2
      반응수
    • 5.8k
      조회수
    • 0
      투표
  • array(    array( 'Key1' => 'Value1' , 'Key2' => 'Value2'),    array( 'Key1' => 'Value1' , 'Key2' => 'Value2'))배열에서 Key1값만 뽑아서 1차원배열을 만들고싶습니다.이럴 경우 최적화된 방법이 없을까요?
    2016.06.07 16:20:53
    • 2
      답변수
    • 3
      반응수
    • 7.8k
      조회수
    • 1
      투표
  • 일단 구현하려는 코드는, gd 라이브러리로 링크 이미지를 생성후,html 코드<img src="linkimage.php" />-----------------------------php 코드<?phpif(isset($_SERVER['HTTP_REFERER'])) { header("Content-type: image/png");// header('Location: http://www.example.com/'); // Set some important CAPTCHA constants define('CAPTCHA_NUMCHARS', 6); // number of characters in pass-phrase define('CAPTCHA_WIDTH', 200); // width of image define('CAPTCHA_HEIGHT', 16); // height of image// $link = $_GET['link'];$link = "http://www.example.com/"; // Create the image $img = imagecreatetruecolor(CAPTCHA_WIDTH, CAPTCHA_HEIGHT);// Set a white background with black text and gray graphics $bg_color = imagecolorallocate($img, 255, 255, 255); // white $text_color = imagecolorallocate($img, 0, 0, 204); // blue// Fill the background imagefilledrectangle($img, 0, 0, CAPTCHA_WIDTH, CAPTCHA_HEIGHT, $bg_color); // Draw the pass-phrase string imagettftext($img, 10, 0, 0, CAPTCHA_HEIGHT - 5, $text_color, 'gulim.ttc', $link);// Output the image as a PNG using a headerimagepng($img);// Clean up imagedestroy($img);}else{ header('Location: http://www.example.com/');}?>이미지를 클릭시 링크로 연결되는 소스인데요..리퍼러를 전달하여 처리하려는데 제가 잘못짚은거같네요..고수분들 도움좀 부탁드립니다.
    2016.05.23 13:35:34
    • 1
      답변수
    • 2
      반응수
    • 5.9k
      조회수
    • 0
      투표
PHP 게시판 정보
  • 34
    질문수
  • 9
    아카이브수
  • 28
    채택수
  • 2
    멤버수
PHP 질문 통계
최근 30일
답변율
0%
채택율
0%
전체
답변율
85%
채택율
82%