Find Jobs
Hire Freelancers

PHP function: connect to http page and check links

$30-250 USD

Completed
Posted over 12 years ago

$30-250 USD

Paid on delivery
Required: A PHP function called checkPage(connect_to_url, link_to_find) i.e., checkPage("[login to view URL]", "[login to view URL]"); I basically want to know if "link_to_find" exists on the page. Use php5 to return an array or other data structure with the following properties per link found on the page: intRequestCode : integer status of the request bLinkFound : boolean whether “link_to_find” is a valid link on the page. sAnchorText : anchor text of the link if found, else “” (blank quotes) intOBLs : integer number of links found on the page. bFollowOK : boolean, false if “rel=nofollow” is part of the link tag. sEntireLinkTag : string of the entire link tag (see below) intPageRank : -1 for now, but call a function that returns -1 (may implement later) *note: intPageRank will be implemented later so call a function called getPageRank() that returns -1 for now. Algorithm tips: Access the page located at connect_to_url using php and: 1) Get the status of the request. if 404 or another error, populate intRequestCode with the error code and return it (exit function). 2) If request successful, place all of the links inside of a data structure (as memory optimized as possible) that stores the contents of the href property, anchor text, the entire link tag. 3) The number of elements in your data structure that stores the links will be stored as intOBLs (outbound links). 4) bLinkFound = true if link_to_find is a link on the page (scan your data structure instead of rescanning the page). sAnchorText is the anchor text of the link (if found, else “”) intOBLs (see #3) bFollowOK: if the link contains “rel=nofollow” then store false, else true. sEntireLinkTag: store the entire link tag found: “<a href=”” ref=””>hello</a>” intPageRank: call a dummy function called getPageRank() that returns -1 and store it. 5) Be sure to clean up all memory (objects, etc) 6) Stress test by running within a loop to one of your server test pages that have a random number of links and various types of links (good and bad). Basic error testing, i.e., “rel = nofollow”, “rel=no follow”, etc are equivalent. Use your best judgement and feel free to ask questions. In your PM, send me: 1) Which php function you will use to make the http request and why. I have read that some are better than others. 2) Your idea related to #2: how you will implement the data structure for speed and memory optimization. Other notes: Code should be well-formatted (4 spaces instead of tabs) and variable names should be camelCased with the first letter designating the data type. For example, sPaper is a string, bFound is a boolean, oWindow is an object, arrBoxes is an array, intNumber is an int, floatNumber is a float, etc. Variable names should reasonably describe what it represents. IntPhn=bad, intPhoneNum=good. Good coding practices are expected (use logical utility functions where appropriate, etc). You will be glad you did this as you will most likely be hired to extend these functions later. Yes, I am a coder but don’t have the cycles to do this but I am looking for quality code. I have additional projects to work on for the right person. Reply with "I read it all" so I know you took the time to read the specs before bidding. Otherwise your bid will not be considered. Thanks for reading.
Project ID: 1385219

About the project

13 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
i have already created the backlinks tracker tool in php. details in PMB
$150 USD in 5 days
4.9 (33 reviews)
5.6
5.6
13 freelancers are bidding on average $137 USD for this job
User Avatar
I read it all and can deliver with curl using regex
$250 USD in 5 days
4.8 (89 reviews)
7.1
7.1
User Avatar
i read it all and I can do this. Thanks.
$200 USD in 4 days
4.8 (84 reviews)
6.5
6.5
User Avatar
I read it all and I'm ready to proceed. Check PM for more info on the matter.
$200 USD in 1 day
4.9 (134 reviews)
6.5
6.5
User Avatar
"I read it all". Hi sir, I am ready to start working on your project right away. I'm an experienced Web Developer having worked for 4+ years with PHP, ASP, JavaScript, Ajax, JQuery and CSS. Please check your inbox(PMB) for further details about my expertises.
$125 USD in 5 days
4.9 (84 reviews)
6.3
6.3
User Avatar
I read it all
$150 USD in 3 days
5.0 (4 reviews)
4.2
4.2
User Avatar
i read it all...
$200 USD in 7 days
4.9 (15 reviews)
3.9
3.9
User Avatar
Hi i can do this project. i know php very well
$100 USD in 5 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Our team is ready for your task.
$150 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Dear Sir, We are having a team of technologies expert working in different technologies like php,Joomla, Smarty,.net, C with our company. We are fully Profession Company and believe to give you full return for which you paid your money. We will give you 100% satisfactory work with best performance. Kindly check your PMB for more details.
$150 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
i did some small project similar but by c#. i think to can make it to easy by php
$40 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Check PMB please.
$30 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Los Angeles, United States
5.0
7
Payment method verified
Member since Apr 3, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.