Jump to content

Search the Community

Showing results for tags 'iframes'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Hi, I am still learning PHP and given some HTML I am trying to extract all links and iframes from the HTML and append them to a different string. I am still learning PHP so I am not sure if how I am checking that the returned array has values (isset) or if I should be appending strings together (.) is correct The code that I have so far is function GetLinksIFrames($content) { $innerContent =''; $regex_pattern_links = "/<a href=\"(.*)\">(.*)<\/a>/"; preg_match_all($regex_pattern_links,$content,$matches); for ($i = 0; $i < count($matches); $i++) { if(isset($matches[0][$i]))// Is this correct? { $innerContent = $innerContent.$matches[0][$i]." "; // Is this how to append a result to an existing string? } } $regex_pattern_iframe = "/<iframe src=\"(.*)\">(.*)<\/iframe>/"; preg_match_all($regex_pattern_iframe,$content,$matches); for ($i = 0; $i < count($matches); $i++) { if(isset($matches[0][$i])) { $innerContent = $innerContent.$matches[0][$i]." "; } } return $innerContent; } Any help appreciated Thanks Mark
  2. Heya all, So I've completed my first semester on PHP programming. I got an A, ./flex ! Anyhow, I'm trying to take what I've learned and practice with it. I ran into a bit of a road block and after spending a day trying to figure it out I decided it was time to come ask the pros 8D. I have some thumbnails inside a folder that are dynamically generated when a user visits a page. What I am trying to do with the thumbnails is have them, when clicked, change the photo inside of an iframe. Unfortunately this is not working. Well, enough gabbing. Here's the code that is the culprit of my problem. I think. <?php require ('includes/photo_functions.php'); $images_dir = "uploads/" . $_SESSION['username'] . "/photos/"; $thumbs_dir = "uploads/" . $_SESSION['username'] . "/photos/thumbs/"; $thumbs_width = 200; $images_per_row = 3; /** generate photo gallery **/ $image_files = get_files($images_dir); if(count($image_files)) { $index = 0; foreach($image_files as $index=>$file) { $index++; $thumbnail_image = $thumbs_dir.$file; if(!file_exists($thumbnail_image)) { $extension = get_file_extension($thumbnail_image); if($extension) { make_thumb($images_dir.$file,$thumbnail_image,$thumbs_width,$extension); } } echo '<a href="#null" onClick="inner_Iframe.location="',$images_dir.$file,'" class="photo-link"><img class="photo-link" src="',$thumbnail_image,'" /></a>'; if($index % $images_per_row == 0) { echo '<div class="clear"></div>'; } } echo '<div class="clear"></div>'; } else { echo '<p>There are no images in this gallery.</p>'; } ?> Any help would be appreciated. I'm hoping this is a logical error or perhaps poorly placed quotations? Best Regards, Nightasy
×
×
  • 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.