Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Freelance Programming Jobs


You are currently viewing our Freelance Programming Jobs as a guest. Please register to participate.
Login



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

Posts: 901
Name: Harvey C
Location: Brighton, UK
Trades: 0
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
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by Harvey; 01-02-2007 at 05:01 PM..
Harvey is offline
View Public Profile
 
 
Register now for full access!
Old 01-02-2007, 07:30 PM Re: Subscribed to expertsexchange? $5 to copy & paste 2 pages
Average Talker

Posts: 18
Trades: 0
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
View Public Profile Visit devaid's homepage!
 
Old 01-10-2007, 12:14 AM Re: Subscribed to expertsexchange? $5 to copy & paste 2 pages
technoguy's Avatar
Extreme Talker

Posts: 151
Trades: 2
Yep, I alwyas go way down to see answers and always found most of the answers. Few answers are for members only.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

the best web designer in surat
technoguy is offline
View Public Profile
 
   

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 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.12425 seconds with 12 queries