Jump to content

Recommended Posts

I am trying to grab information out of this

<div style="overflow: hidden; background-image: url(http://s.bebo.com/img/bebobadge_1_black.gif); background-repeat: no-repeat; width: 300px; height: 175px;"><span style="width:90px; height:90px;"><a href="http://www.bebo.com/badge/9211222062"><img src="http://www.bebo.com/profilephoto/9211222062a1363459018bblack.jpg" style="border: 0pt none ; margin: 10px 0pt 27px 10px; width: 90px; height: 90px;"></a></span><br><a href="http://www.bebo.com/badge/9211222062" style="padding: 0pt 0pt 0pt 10px; overflow: hidden; display: block; color: white; font-weight: bold; font-size: 16px; width: 300px;">PGR Events</a><a href="http://www.bebo.com/badge/9211222062" style="padding: 0pt 0pt 0pt 10px; display: block; color: white; font-weight: bold; font-size: 12px;">http://www.bebo.com/pgrevents</a><br></div>

 

specifcly the profile photo bit http://www.bebo.com/profilephoto/9211222062a1363459018bblack.jpg

 

As you will notice with the code i am trying to get is numbers then a then numbers...

I can get the numbers before the a fine using;

<?php
session_start();
$catch = $_POST['code'];
preg_match('#/profilephoto/a(\d+)#', $catch, $match);
$pop = array_pop($match);
?>

 

Its the part after the letter I cannot seem to grab.

 

Am I on the right track here or is there another most probably easier way lol

 

 

thanks

 

Paul

 

Link to comment
https://forums.phpfreaks.com/topic/157431-solved-preg_match-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.