테스트 사이트 - 개발 중인 베타 버전입니다

질문좀요 채택완료

완전초보에여 1년 전 조회 1,578

123.php 파일이 

아래의 코드를 가지고 있을경우 abc123.com/123.php 브라우저 실행시 자동으로 글 등록 되도록 가능할까요?

 

</p>

<p><?php</p>

<p>include_once('./_common.php');</p>

<p>$g5['title'] = "게시글 이동 등록";

include_once(G5_PATH.'/head.php');</p>

<p>?></p>

<p><header class="selector">

<form name="hquery" action="scrap_action.php" method="post">

  <section style="margin:20px 0">

  <p><label style="font-weight:700;width:120px;display:inline-block;">스크랩할 URL: </label><input type="url" name="url" value="<?php echo htmlspecialchars(@$url, ENT_QUOTES);?>" placeholder="예. <a href="https://365ok.co.kr"" target="_blank" rel="noopener noreferrer">https://365ok.co.kr"</a> autofocus class="frm_input half_input  <?php echo $required ?>" required></p>

  <p><label style="font-weight:700;width:120px;display:inline-block;">입력할 게시판명: </label><input type="text" name="bo_table" value="<?php echo htmlspecialchars(@$bo_table, ENT_QUOTES);?>" placeholder="예. humor" class="frm_input half_input <?php echo $required ?>" required></p>

  </section></p>

<p>  <p>** ftp정보를 root.php 정보에서 입력하셔야 게시글 등록이 가능 합니다.</p>

<section style="margin:20px 0">

  <p><label style="font-weight:700;width:120px;display:inline-block;">목록 Selector: </label><input type="text" name="sel" value="<?php echo htmlspecialchars(@$sel, ENT_QUOTES);?>" placeholder="예. table.tb_list" class="frm_input half_input <?php echo $required ?>" required></p>

  <p><label style="font-weight:700;width:120px;display:inline-block;">목록 제목 Selector: </label><input type="text" name="sel12" value="<?php echo htmlspecialchars(@$sel12, ENT_QUOTES);?>" placeholder="예. table.list_title" class="frm_input half_input <?php echo $required ?>" required></p>

</section>

<section style="margin:20px 0">

  <p><label style="font-weight:700;width:120px;display:inline-block;">글보기 Selector: </label><input type="text" name="sel2" value="<?php echo htmlspecialchars(@$sel2, ENT_QUOTES);?>" placeholder="예. div#container" class="frm_input half_input <?php echo $required ?>"  required></p>

  <p><label style="font-weight:700;width:120px;display:inline-block;">글보기 제목 Selector: </label><input type="text" name="sel22" value="<?php echo htmlspecialchars(@$sel22, ENT_QUOTES);?>" placeholder="예. div#title" class="frm_input half_input <?php echo $required ?>" required></p>

  <p><label style="font-weight:700;width:120px;display:inline-block;">글보기 내용 Selector: </label><input type="text" name="sel23" value="<?php echo htmlspecialchars(@$sel23, ENT_QUOTES);?>" placeholder="예. div#content" class="frm_input half_input <?php echo $required ?>" required></p>

</section>

  <p>

      <button type="submit" name="go" value="elements" class="btn btn_submit">스크래핑하기</button>

  </p></p>

<p></form>

</header></p>

<p>

<?php

  include_once(G5_PATH.'/tail.php');

?>

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트

</p>

<p><?php </p>

<p>    $bo_table = "free";

    $write_table = $g5['write_prefix'].$bo_table;</p>

<p>    $wr_num = get_next_num($write_table);

    $wr_reply = "";

    $ca_name = "카테고리";

    $wr_subject = "글쓰기 제목 설정";

    $wr_content = "본문내용 입력";</p>

<p>    $sql = " insert into {$write_table}

         set wr_num = '{$wr_num}',

        wr_reply = '{$wr_reply}',

        wr_comment = '0',

        ca_name = '{$ca_name}',

        wr_option = '{$wr_option}',

        wr_subject = '{$wr_subject}',

        wr_content = '{$wr_content}',

        wr_seo_title = '{$wr_seo_title}',

        wr_link1 = '{$wr_link1}',

        wr_link2 = '{$wr_link2}',

        wr_link1_hit = '0',

        wr_link2_hit = '0',

        wr_hit = '0',

        wr_good = '0',

        wr_nogood = '0',

        mb_id = '".$member['mb_id']."',

        wr_password = '{$wr_password}',

        wr_name = '{$wr_name}',

        wr_email = '{$wr_email}',

        wr_homepage = '{$wr_homepage}',

        wr_datetime = '".G5_TIME_YMDHIS."',

        wr_last = '".G5_TIME_YMDHIS."',

        wr_ip = '".$_SERVER['REMOTE_ADDR']."',

        as_img = '{$as_img}',

        wr_1 = '{$wr_1}',

        wr_2 = '{$wr_2}',

        wr_3 = '{$wr_3}',

        wr_4 = '{$wr_4}',

        wr_5 = '{$wr_5}',

        wr_6 = '{$wr_6}',

        wr_7 = '{$wr_7}',

        wr_8 = '{$wr_8}',

        wr_9 = '{$wr_9}',

        wr_10 = '{$wr_10}' ";

    sql_query($sql);

?></p>

<p>
원하는 곳에 위의 내용을 가져오면 자동으로 글쓰기 됩니다. 필요한 항목은 맞추어 넣어야 할 것입니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인