| | |
Database results from one site to another
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2008
Posts: 37
Reputation:
Solved Threads: 0
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.
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.
Well to retrieve the entire page use file_get_contents() then preg_match_all() to filter to that table. Below is an example
Usually I only use curl if it involves pinging or posting to a server.
php Syntax (Toggle Plain Text)
<? $var=file_get_contents('http://superdialcouk.dmshop.biz/numbers/0207/choose.php?dmb1_SessRef=2009-08-22_15-29-14_8068_0003'); $var=preg_match_all('/<table class="vert_centered_leaded" style="width: 100%;".*<tr>.*<tr>.*<\/tr>(.*<\/table>)/Us',$var,$array); //print_r($array); $var='<table class="vert_centered_leaded" style="width: 100%;">'.$array[1][0]; unset($array); echo $var; ?>
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
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
fopen
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.
•
•
•
•
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.
current personal projects The H8ers Club
![]() |
Similar Threads
- question on SEO and database-driven site integration... (PHP)
- How to SEO a large database driven site (Search Engine Optimization)
- Best CMS for database driven site (PHP)
- mod_rewrite Joomla database driven site (*nix Software)
- submiting info into a database for retrieval! (PHP)
Other Threads in the PHP Forum
- Previous Thread: Cache-Control help
- Next Thread: Isnt displaying database results
| Thread Tools | Search this Thread |
ajax apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link list login mail mediawiki menu mlm multiple mycodeisbad mysql number oop paypal pdf php phpincludeissue phpmyadmin problem query radio random recursion regex remote script search seo server sessions sms soap source sp space speed sql subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign websphere white xml youtube






