Database results from one site to another

Reply

Join Date: Nov 2008
Posts: 37
Reputation: caps_lock is an unknown quantity at this point 
Solved Threads: 0
caps_lock caps_lock is offline Offline
Light Poster

Database results from one site to another

 
0
  #1
Aug 22nd, 2009
Looking at the source code of this website:


http://superdialcouk.dmshop.biz/numb...9-14_8068_0003



What code do i copy and paste to get that table of telephone numbers on my website, the numbers need to remain dynamic in thesense tat if theyre purchased from the site given above - they then should not be viewable on my site.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 156
Reputation: Dsiembab is an unknown quantity at this point 
Solved Threads: 2
Dsiembab's Avatar
Dsiembab Dsiembab is offline Offline
Junior Poster

Re: Database results from one site to another

 
0
  #2
Aug 22nd, 2009
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,476
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 136
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: Database results from one site to another

 
0
  #3
Aug 24th, 2009
Well to retrieve the entire page use file_get_contents() then preg_match_all() to filter to that table. Below is an example
  1. <?
  2. $var=file_get_contents('http://superdialcouk.dmshop.biz/numbers/0207/choose.php?dmb1_SessRef=2009-08-22_15-29-14_8068_0003');
  3. $var=preg_match_all('/<table class="vert_centered_leaded" style="width: 100%;".*<tr>.*<tr>.*<\/tr>(.*<\/table>)/Us',$var,$array);
  4. //print_r($array);
  5. $var='<table class="vert_centered_leaded" style="width: 100%;">'.$array[1][0];
  6. unset($array);
  7. echo $var;
  8. ?>
Usually I only use curl if it involves pinging or posting to a server.
Last edited by cwarn23; Aug 24th, 2009 at 4:31 am. Reason: code tag syntax
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 156
Reputation: Dsiembab is an unknown quantity at this point 
Solved Threads: 2
Dsiembab's Avatar
Dsiembab Dsiembab is offline Offline
Junior Poster

Re: Database results from one site to another

 
0
  #4
Aug 24th, 2009
fopen
If PHP has decided that filename specifies a registered protocol, and that protocol is registered as a network URL, PHP will check to make sure that allow_url_fopen is enabled. If it is switched off, PHP will emit a warning and the fopen call will fail.
Also if someone gets wary of the ip address that the request is being made from your server ip could get blacklisted. with curl you can change the headers being sent to mirror googlebot or what not. Then none would be the wiser.
current personal projects The H8ers Club
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC