Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 11-13-2013, 01:33 AM
Impromptu Impromptu is offline
 
Join Date: Jun 2012
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Max Taxable View Post
As I joked earlier - you are working with byzantine code- PERL, which went into the bin of technological obsolescence along with audio cassette tapes. This is the 21st Century, Mac and there's no reason I can think of, to call a Perl script.

There's nothing you can do in Perl that can't be done better in PHP so I don't understand why your friend codes in PERL. Does he live in a cave or something? My reference to Hammurabi was trying to say just the above. Hammurabi's code? Never heard of it?
LOL I have no idea.

It should be a simple script as all I want to do is webscrape from a website...I actually tried to self-teach myself PHP but it was too hard...

Okay better question is does anyone know a PHP where you can web scraper data such as NBA rosters, NFL scores etc?

I guess if noone knows how to call a Perl script nor can direct me to a good webscrapping script...might not have this feature
Reply With Quote
Благодарность от:
nhawk
  #12  
Old 11-13-2013, 05:36 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Webscraping is something that practically always has to be done custom for the very page you want to scrape. You need to adapt it to it specifically, and you need to cater for any changes that are made to the source website, continously. That's hard if you have no idea yourself, and its even harder in Perl (which every reasonable web dev has long forgotten). Are there no reliable xml sources for the stuff you want?

Anyway, Max is absolutely right - to do this in Perl is like trying to fix a car with a stone axe or write a book with stone and chisel. Still you were told how to call a perl script from php - we do know how to do that. What we don't know and can't know is the correct path and permissions setting on your server.
Reply With Quote
3 благодарности(ей) от:
Max Taxable, nhawk, tbworld
  #13  
Old 11-13-2013, 05:42 AM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very elegantly written @Cellarius.

This is really not a programming question, merely a programming task to be completed, and should be re-asked in a 'request' forum.
Reply With Quote
  #14  
Old 11-13-2013, 11:10 AM
Impromptu Impromptu is offline
 
Join Date: Jun 2012
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cellarius View Post
Webscraping is something that practically always has to be done custom for the very page you want to scrape. You need to adapt it to it specifically, and you need to cater for any changes that are made to the source website, continously. That's hard if you have no idea yourself, and its even harder in Perl (which every reasonable web dev has long forgotten). Are there no reliable xml sources for the stuff you want?

Anyway, Max is absolutely right - to do this in Perl is like trying to fix a car with a stone axe or write a book with stone and chisel. Still you were told how to call a perl script from php - we do know how to do that. What we don't know and can't know is the correct path and permissions setting on your server.
Quote:
Originally Posted by tbworld View Post
Very elegantly written @Cellarius.

This is really not a programming question, merely a programming task to be completed, and should be re-asked in a 'request' forum.
Thanks fellas,


I actually offered to pay someone to do it for me: https://vborg.vbsupport.ru/showthread.php?t=302075 however, noone wanted the job. Therefore, I asked my mate to do it, but he did it in Perl.

My friend, probably just picked Perl as it was probably just the easiest for him and to be fair the guy has worked for very well known companies but probably just programs in his preferred language.

If anyone wants the job, please PM me https://vborg.vbsupport.ru/showthread.php?t=302075

It's a free website and more of a hobby, so while I'm willing to pay, I'm not willing to pay a fortune LOL.

BTW That's for everyone's responses too

Quote:
Originally Posted by cellarius View Post
Are there no reliable xml sources for the stuff you want?
Actually tried Mozenda and was thinking of the price, but it didn't work and also refresh was not every 30 seconds..

Checked a few and some were too much or some just didn't work. Some just automate web scraping to the computer and not online..Any suggestions will be appreciated...

While I note your comments about the Perl concerns, to be fair, it actually works in Command or Local format.
Reply With Quote
  #15  
Old 11-13-2013, 03:18 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Impromptu View Post

While I note your comments about the Perl concerns, to be fair, it actually works in Command or Local format.
My race car engine from 1932 runs great in my garage too. But can't take it out on the road without.. Oh, let's see. A chassis, axles, wheels.... So it really doesn't do me a bit of good running great in my garage.

EDIT TO ADD:

You might could let your Geico caveman coder have a look at this and see if he can translate the perl into PHP for you.

He might originally see it as Star Trek stuff, but soon he will realize the similarities and the much expanded horizons this can give him.
Reply With Quote
  #16  
Old 11-13-2013, 09:08 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Impromptu View Post
I tried the PERL script via command prompt...
Assuming this is Linux you can do a pwd and get the path to your script. People can say whatever they want about Perl, but if it works, who cares.

ETA: oh, just noticed that cellarius already mentioned pwd. I missed it the first time through.
Reply With Quote
  #17  
Old 11-13-2013, 09:36 PM
Max Taxable's Avatar
Max Taxable Max Taxable is offline
 
Join Date: Feb 2011
Posts: 3,134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bicycles work too. But wouldn't you really rather have a Buick?
Reply With Quote
  #18  
Old 11-14-2013, 06:26 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Max Taxable View Post
Bicycles work too. But wouldn't you really rather have a Buick?
That really depends. I wouldn't want to ride a Buick downhill in the Alps
Reply With Quote
Благодарность от:
Max Taxable
  #19  
Old 11-18-2013, 05:28 AM
Impromptu Impromptu is offline
 
Join Date: Jun 2012
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for all your help guys.

I decided to pay someone to do it for me
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 01:10 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04043 seconds
  • Memory Usage 2,258KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (9)post_thanks_box
  • (5)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete