Lost Password?

Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-10-2008, 02:57 PM
Jaan's Avatar   
Jaan Jaan is offline
Moderator
 
Join Date: Dec 2006
Location: Estonia
Age: 17
Posts: 426
Last Blog:
Wadio Media Layout Com...
Rep Power: 9
Jaan will become famous soon enoughJaan will become famous soon enough
Send a message via MSN to Jaan
Default HTML from text

Hey dudes..

I have to get this images/stories/news/Girard-Perregaux-Shopping-W.gif
from this html code:

HTML Code:
<p><img src="images/stories/news/Girard-Perregaux-Shopping-W.gif" border="3" alt="Girard-Perregaux-Shopping-Watch" title="Girard-Perregaux-Shopping-Watch" width="550" height="468" /></p><p>The world becomes an extremely alluring place when women take over. The proof of this is provided by the ww.tc 24 Hour Shopping, which gives the time in twenty-four time zones, with its own particular interpretation of the planet: it indicates the time not in cities, but in places famous for their fashion and luxury boutiques, such as Faubourg Saint-Honor&eacute;, Dubai or Ginza.&nbsp;</p><p>&nbsp;</p>
If anyone have an idea.. please tell me :/
__________________


Cheap & Professional Web Design | Need help? Send a PM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 05-10-2008, 04:44 PM
John's Avatar   
John John is online now
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,345
Last Blog:
PHP Function Overloadi...
Rep Power: 50
John is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of light
Send a message via AIM to John
Default Re: HTML from text

I have no idea what you're asking.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-10-2008, 07:12 PM
Jaan's Avatar   
Jaan Jaan is offline
Moderator
 
Join Date: Dec 2006
Location: Estonia
Age: 17
Posts: 426
Last Blog:
Wadio Media Layout Com...
Rep Power: 9
Jaan will become famous soon enoughJaan will become famous soon enough
Send a message via MSN to Jaan
Default Re: HTML from text

This is my HTML ****:

HTML Code:
<p><img src="http://forum.codecall.net/images/stories/news/Girard-Perregaux-Shopping-W.gif" border="3" alt="Girard-Perregaux-Shopping-Watch" title="Girard-Perregaux-Shopping-Watch" width="550" height="468" /></p><p>The world becomes an extremely alluring place when women take over. The proof of this is provided by the ww.tc 24 Hour Shopping, which gives the time in twenty-four time zones, with its own particular interpretation of the planet: it indicates the time not in cities, but in places famous for their fashion and luxury boutiques, such as Faubourg Saint-Honor&eacute;, Dubai or Ginza.&nbsp;</p><p>&nbsp;</p>
Okay.. this script or something has to get and put this (this long bold text) from the HTML script:

<img src="http://forum.codecall.net/images/stories/news/Girard-Perregaux-Shopping-W.gif" border="3" alt="Girard-Perregaux-Shopping-Watch" title="Girard-Perregaux-Shopping-Watch" width="550" height="468" />

...to a variable.. and then it has to cut it again.. and then i have to get and put this:

images/stories/news/Girard-Perregaux-Shopping-W.gif

to a variable.. so

PHP Code:
$image "http://forum.codecall.net/images/stories/news/Girard-Perregaux-Shopping-W.gif"
but this script or method has to find this image url.. from that HTML thingy..
__________________


Cheap & Professional Web Design | Need help? Send a PM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-10-2008, 07:27 PM
John's Avatar   
John John is online now
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,345
Last Blog:
PHP Function Overloadi...
Rep Power: 50
John is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of light
Send a message via AIM to John
Default Re: HTML from text

PHP Code:
#!/usr/bin/php -q
<?php

$content 
'<p><img src="http://forum.codecall.net/images/stories/news/Girard-Perregaux-Shopping-W.gif" border="3"
alt="Girard-Perregaux-Shopping-Watch" title="Girard-Perregaux-Shopping-Watch" width="550" height="468" /></p><p>The world becomes an
extremely alluring place when women take over. The proof of this is provided by the ww.tc 24 Hour Shopping, which gives the time in
twenty-four time zones, with its own particular interpretation of the planet: it indicates the time not in cities, but in places famous
for their fashion and luxury boutiques, such as Faubourg Saint-Honor&eacute;, Dubai or Ginza.&nbsp;</p><p>&nbsp;</p>'
;

preg_match('#(?<=<img src=").*?(?=")#'$content$image);

print_r($image);
?>
Output:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall

Last edited by John; 05-10-2008 at 08:01 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-10-2008, 07:42 PM
phpforfun's Avatar   
phpforfun phpforfun is online now
Programming God
 
Join Date: Feb 2008
Posts: 513
Last Blog:
ubuntu... do not upgra...
Rep Power: 5
phpforfun will become famous soon enough
Default Re: HTML from text

you got a typo john

nice though
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 05-10-2008, 08:01 PM
John's Avatar   
John John is online now
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,345
Last Blog:
PHP Function Overloadi...
Rep Power: 50
John is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of light
Send a message via AIM to John
Default Re: HTML from text

Fixed, thanks for pointing that out
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-10-2008, 08:03 PM
phpforfun's Avatar   
phpforfun phpforfun is online now
Programming God
 
Join Date: Feb 2008
Posts: 513
Last Blog:
ubuntu... do not upgra...
Rep Power: 5
phpforfun will become famous soon enough
Default Re: HTML from text

:-D I point out small crap all the time.


(ask jordan, lol)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-11-2008, 04:10 AM
Jaan's Avatar   
Jaan Jaan is offline
Moderator
 
Join Date: Dec 2006
Location: Estonia
Age: 17
Posts: 426
Last Blog:
Wadio Media Layout Com...
Rep Power: 9
Jaan will become famous soon enoughJaan will become famous soon enough
Send a message via MSN to Jaan
Default Re: HTML from text

wow.. thats nice.. thank you <3
__________________


Cheap & Professional Web Design | Need help? Send a PM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-11-2008, 01:20 PM
John's Avatar   
John John is online now
Co-Administrator
 
Join Date: Jul 2006
Age: 19
Posts: 2,345
Last Blog:
PHP Function Overloadi...
Rep Power: 50
John is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of lightJohn is a glorious beacon of light
Send a message via AIM to John
Default Re: HTML from text

No problem
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-11-2008, 04:49 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Age: 25
Posts: 4,512
Last Blog:
Zend: PHP Security Web...
Rep Power: 50
Jordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud ofJordan has much to be proud of
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default Re: HTML from text

I like the shebang at the top of your script. I've never really thought about adding this to a PHP script but it would be useful for shell script execution.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML with Swing Components John Java Tutorials 0 09-23-2007 09:59 PM
How to style fonts of a text in a simple page? c0de Tutorials, Classes and Code 3 09-15-2007 10:08 PM
About HTML Onur Tutorials, Classes and Code 0 08-28-2007 06:13 PM
HTML Basic Formatting clookid Tutorials, Classes and Code 14 03-06-2007 03:10 PM
HTML Introduction clookid Tutorials, Classes and Code 5 01-08-2007 09:43 PM


All times are GMT -5. The time now is 03:38 PM.

Contest Stats

John ........ 87.50000
dargueta ........ 75.00000
Xav ........ 50.00000
MeTh0Dz ........ 20.00000
gaylo565 ........ 18.00000
Johnnyboy ........ 3.00000

Contest Rules

Ads