Jump to content

katerina

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

katerina's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you it is perfect!
  2. Hi, I have a project and I have to paste my code in my word document. I use dreamweaver cs3, I do copy and paste in word document but the text is not colored like dreamweaver. Is thera any way to do this ? I mean for example the tag <?php in dreamweaver is colored red, but when I paste it on word I take as result black.
  3. The code does not work for site http://www.contra.gr Maybe because between <iframe> and </iframe > does not exist text And in the first regular expression you use [^<]* Is there another solution ?
  4. Thank you very very much for your code! !Just perfect!
  5. Hi, I want to match all <iframe> ements. To be more specific , let the text : $text='<iframe src ="/default.asp" width="100%"> </iframe><Iframe longdesc="Hello" src="a.php"></iframe> <iframe src="b.php" longdesc="Hi">Hello world</iframe>'; I want to check $text and print : I found 3 <iframe> elements, but only 1 <iframe> of them, has both longdesc attibute and text between <iframe></iframe>. Could somebody help me ? Thanks
  6. Hi all, I found an algorithm that detects ascii art in a site. I would like to make a function with parameter $url which implementates this algorithm. The algorithm is The following is the summary of ASCII art detection rules: 1. Enclosed by < XMP> or < PRE> elements. 2. One or more occurrences of 4 or more consecutive use of same characters. (characters, or blanks) * A. One or more occurrences of 4 or more same characters consecutively. * B. When ASCII art does not have 4 consecutive letters, it can be identified by occurrences of 4 or more blank spaces. Sample 'A' with 4 or more spaces. Sample 'B' with 4 or more spaces. 3. Generally displayed using more than 10 lines. * A. When greater than 10 lines are used, any ASCII character is used (irrelevant). Sample with more than 10 lines. * B. When less than 10 lines are used, use of non-alphabetic, non-numeric ASCII characters outweigh the use of alphabetic, numeric ASCII characters. - 4 lines for a sleeping kitten ASCII art - 6 lines for heading using ASCII art
  7. Hi, I want to check a site $url="http://..."; $file=file_get_contents($url); if has an image map (server-side or client side image map) and then to print : Found : Server side image map or Found : Client Side image map or Not Found Client or Server-side map Could someone help me ???? Thanks
  8. Thanks a lot!! I would like to ask and something else, I am trying to insert into database these headings. MySQL Code is CREATE DATABASE `project` DEFAULT CHARACTER SET greek COLLATE greek_general_ci; USE project; CREATE TABLE headings( id_heading smallint(5) NOT NULL auto_increment, type varchar(5) NOT NULL, text TEXT DEFAULT NULL, PRIMARY KEY (id_heading) )ENGINE = innodb CHARACTER SET greek COLLATE greek_general_ci COMMENT = ''; But I have a problem in mysql with my language. I take as results '????????????????'. I use WAMPSERVER 2.0
  9. Hi, I would like to print the text add the kind of heading, but I don't know how can I print. I would like something like : 1 Hello 2 Some title 3 World 1 Heading 1 My code is : $text = "<H1>Hello</H1><H2><a href='go'>some title</a></H2><H3 class='pro'>World</H3><H1>Heading 1</H1>"; $matches = array(); $numMatches = preg_match_all( '/<H(?P<level>[1-6])(?P<attrib>.*?'.'>)(?P<header>.*?)<\/H[1-6] *>/i', $text, $matches ); foreach( $matches[3] as $headline ) { print $headline."<br>"; } Thanks a lot
  10. Thank you very much! You are an expert. It works perfect! Thanks again!
  11. Thanks a lot for your solution. It works perfect, but as I refer above I would like also when I ckick on a color -image to change the Hello World. For example onclick Foreground image : #000000 --> make the text Hello World black colored onclick Background Color : #ffffff --> make the background of Hello world white colored Thanks a lot
  12. Hi all, I need your help. I have made a code that appears some images of colors. Below there are three three input elements , for R, G and B. I would like when the user clicks on an image to insert the value of color in input elements. This is for backgound colour. I would like to do the same on foreground. And finally I want to fill another div element with foreground and background. My code for these divs is : <div id="color"> <div id="col"> <h2>Foreground/h2> <p> <a style="background-color: rgb(0, 0, 0);" title="#000000"><img src="images/px.gif" alt="#000000" class="px"></a> <a style="background-color: rgb(0, 0, 192);" title="#0000C0"><img src="images/px.gif" alt="#0000C0" class="px"></a> <a style="background-color: rgb(73, 108, 143);" title="#496C8F"><img src="images/px.gif" alt="#496C8F" class="px"></a> <a style="background-color: rgb(127, 0, 127);" title="#7F007F"><img src="images/px.gif" alt="#7F007F" class="px"></a> <br> <a style="background-color: rgb(255, 255, 255);" title="#FFFFFF"><img src="images/px.gif" alt="#FFFFFF" class="px"></a> </p> <p> <b> R : </b><input name="color11" maxlength="3" size="8" value="000" type="text"><br> <b> G : </b><input name="color12" maxlength="3" size="8" value="000" type="text"><br> <b> B : </b><input name="color13" maxlength="3" size="8" value="000" type="text"> </p> </div> <div id="bg"> <h2>Background</h2> <p> <a style="background-color: rgb(73, 108, 143);" title="#496C8F"><img src="images/px.gif" alt="#496C8F" class="px"></a> <a style="background-color: rgb(96, 132, 164);" title="#6084A4"><img src="images/px.gif" alt="#6084A4" class="px"></a> <a style="background-color: rgb(169, 192, 213);" title="#A9C0D5"><img src="images/px.gif" alt="#A9C0D5" class="px"></a> <a style="background-color: rgb(255, 255, 255);" title="#FFFFFF"><img src="images/px.gif" alt="#FFFFFF" class="px"></a> </p><br> <p> <b> R : </b><input maxlength="3" size="8" value="000" type="text"><br> <b> G : </b><input maxlength="3" size="8" value="000" type="text"><br> <b> B : </b> <input maxlength="3" size="8" value="000" type="text"> </p> </div> <div id="cont"> <h2>SHOW</h2> <div id="plaisio" name="plaisio" style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"> <p style="padding: 1.5em 0em 2em;"><br> <span style="font-size: 1.5em;">Hello World</span><br> </p> </div> </div> <p style="text-align: center; clear: both;"> <input value="check" type="submit"></p> <h2 style="clear: both;"> </h2> <p> </p> </div> Thanks a lot
  13. Hi, I would like to save all headings text from a string. I use MySQL and php MySQL CREATE TABLE head( id_heading smallint(5) NOT NULL auto_increment, type varchar(5) NOT NULL, textx TEXT DEFAULT NULL, PRIMARY KEY (id_HEADING) ); PHP <html> <body> <?php if (!@mysql_connect('localhost', 'root', '')) { echo " ".mysql_error(); exit; } // retrieve all h1 tags function get_h1($file){ $h1tags = preg_match_all("/(<h1.*>)(\w.*)(<\/h1>)/isxmU",$file,$patterns); $res = array(); array_push($res,$patterns[2]); array_push($res,count($patterns[2])); return $res; } $file = '<h1>Hello Wolrd</h1><h1>Hello 2 World</h1>'; $h1 = get_h1($file); // get h1 tags if($h1[1] != 0) { foreach($h1[0] as $key => $val) { $id_heading = $key; $query = "INSERT INTO head (id_image,type,textx) VALUES('.$id_heading.','h1','.htmlentities($val).')"; } } mysql_close(); ?> </body> </html> What am I doing wrong ?? It does not work. Thanks a lot
  14. Hi, I create a site and I would like your help. I use an image that if an user clicks on it , I want to open a new window and the source code of a page appears. To be more specific, I save in variable $url the url of a page. For example, $url="http://www.google.com"; So, when I click on an image it I want to be appeared a page with : 1. <HTML><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title>... 2. function sf(){document.f.q.focus()} ... Could someone help me ??
  15. please somebody ??
×
×
  • 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.