Find Jobs
Hire Freelancers

PHP Class to mirror a single page of a website

$30-100 USD

완료함
게시됨 약 15년 전

$30-100 USD

제출할때 지불됩니다
I need a php class that will mirror a url that is provided to it and save it on the local server. For example: $mirror = new MirrorUrl(); $mirror->setUrl("[login to view URL]"); $mirror->setSavePath("/home/cricava/public_html/pages/curl"); $mirror->download(); This class will a) download the file ([login to view URL]) and save it to the local directory specified. b) will then crawl through the file and download any links that are required, such as css files, javascript files and images. It should then save these images in the same folder structure and if nescessary, rewrite the html page ([login to view URL]) so that it links to these files saved to the server. ## Deliverables I need a php class that will mirror a url that is provided to it and save it on the local server. For example: $mirror = new MirrorUrl(); $mirror->setUrl("[login to view URL]"); $mirror->setSavePath("/home/cricava/public_html/pages/curl"); $mirror->download(); This class will a) download the file ([login to view URL]) and save it to the local directory specified. b) will then crawl through the file and download any links that are required, such as css files, javascript files and images. It should then save these images, css and js files in the same folder structure and if nescessary, rewrite the html page ([login to view URL]) so that it links to these files saved to the server for js, css and images. Any links to other pages should be re-written so that they are fully qualified with a host (so that if you click it you will be taken back to the actual website). The class should use libcurl in PHP to get the contents of the webpage. Requirements a. If a URL has some 'GET' parameters then the class should rename the resulting file so that it works fine on the server. For example if the URL is "[login to view URL]" then the class should save the file as "[login to view URL]" b. The class should check if files exist before writing them to the local server. If they exist the class should rename them with a random name and update the html file to point to this. c. The class needs the following public functions i. setUrl - set the url to be downloaded ii. setSavePath - set the local path to save the page too iii. getSavedFileName - return the filename of the page (for example in (b) above the file name would be [login to view URL] iv. exec - download the files from the remote server to the local and return true or false v. getError - return a text message with the error encountered. (if any) d. The class should chmod the file so that it is editable by other PHP functions e. Any links to other HTML pages within the downloaded HTML pages should be rewritten to include the fully qualified path. That is: if a page has a menu link of "[login to view URL]", and the URL of the page is [login to view URL], then the link should be rewritten as [login to view URL] and be saved in the download html page ([login to view URL]) f. If a webpage has iframes or frames, the contents of the iframes/frames **should** be saved to the local server automatically and the same set of rules should be applied (as above). However, if the page is just linking to other pages on the website, such as in the menu, these pages should **not** be saved locally and simply linked as in (e). **Non-functional requirements ** a. The code must be readable and follow readability standards b. All function, variable names should be labelled clearly, with a name that describes their purpose c. Code should be fully commented for future modifications d. The code should be a class that uses cURL and an XML parser (if required) that is freely avaliable and supported by shared hosts. (cUrl is already installed on my server)
프로젝트 ID: 3769869

프로젝트 정보

6 제안서
원격근무 프로젝트
활동 중 15년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
프로젝트를 수여된 사용자:
사용자 아바타
See private message.
$51 USD 30일에
5.0 (42 건의 리뷰)
4.4
4.4
6 이 프로젝트에 프리랜서들의 평균 입찰은 $65 USD입니다.
사용자 아바타
See private message.
$77.35 USD 30일에
5.0 (26 건의 리뷰)
5.9
5.9
사용자 아바타
See private message.
$42.50 USD 30일에
5.0 (113 건의 리뷰)
5.6
5.6
사용자 아바타
See private message.
$85 USD 30일에
5.0 (4 건의 리뷰)
3.3
3.3
사용자 아바타
See private message.
$85 USD 30일에
4.3 (10 건의 리뷰)
2.6
2.6
사용자 아바타
See private message.
$46.75 USD 30일에
0.0 (0 건의 리뷰)
0.0
0.0

고객에 대한 정보

국기 (AUSTRALIA)
Melbourne, Australia
5.0
3
11월 29, 2011부터 회원입니다

고객 확인

감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.