Reply
Subscribed to expertsexchange? $5 to copy & paste 2 pages
Old 01-02-2007, 03:52 PM Subscribed to expertsexchange? $5 to copy & paste 3 pages
Harvey's Avatar
Super Spam Talker

iTrader Rating: 0 (View)
Posts: 901
Name: Harvey C
Location: Brighton, UK
If you're subscribed to expertsexchange, please could you PM me the following pages:

http://www.experts-exchange.com/Web/..._21404768.html
https://secure.experts-exchange.com/...n%3D11&rsid=10
https://secure.experts-exchange.com/...n%3D11&rsid=10

$5 will be quickly sent back (If I'm not asleep)...

PS: Nice to be back - haven't posted for a few months
__________________
Buy wii fit|Gift ideas

Last edited by Harvey : 01-02-2007 at 04:01 PM.
Harvey is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 01-02-2007, 06:30 PM Re: Subscribed to expertsexchange? $5 to copy & paste 2 pages
Average Talker

iTrader Rating: 0 (View)
Posts: 18
Don't be fooled by the View Solution Button. Just scroll down the page for the answer

I can see that
Code:
Accepted Answer from German_Rumm 
Date: 04/27/2005 01:18PM PDT
Grade: A
 Accepted Answer  


lamerhooDJV,

well, for that listing I would use following code:
<?php
    $pattern = '/addListing&.*city=(.*?)&state=(.*?)&zip=(.*?)&name=(.*?)&phone=(.*?)&/i';
    preg_match_all($pattern, $html, $matches, PREG_SET_ORDER);
    foreach ($matches as $match) {
        list ($city, $state, $zip, $name, $phone) = array_slice($match, 1);
        $address = $city;
        if (!empty($state)) $address .= ', '.$state;
        if (!empty($zip)) $address .= ', '.$zip;
        $values[] = '("'.urldecode($name).'", "'.$address.'", "'.urldecode($phone).'")';
    }
    
    $sql = 'INSERT INTO table VALUES '.implode(', ', $values);
    echo $sql;
?>

You see, all the information you need is really encoded in addListing url (at least in your example it is)
so it's much easier to parse it, than try to extract text from HTML. It also not likely to change with site re-design...
devaid is offline
Reply With Quote
View Public Profile Visit devaid's homepage!
 
Old 01-09-2007, 11:14 PM Re: Subscribed to expertsexchange? $5 to copy & paste 2 pages
technoguy's Avatar
Extreme Talker

iTrader Rating: 2 (View)
Posts: 151
Yep, I alwyas go way down to see answers and always found most of the answers. Few answers are for members only.
__________________
Web Design in Surat Students Project PHP Help
the best web designer in surat
technoguy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Subscribed to expertsexchange? $5 to copy & paste 2 pages
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13926 seconds with 12 queries