Hello,
I'm writing a screen scraper application and want to be able to get absolute addresses for images from relative links.
So a link like this: Code: <img src="../e-commerce_in_a_box_small.jpg" alt="E-Commerce" width="100" height="134" border="0" /> might link to http://www.myointernational.com/furniture/e-commerce_in_a_box_small.jpg
If I am analysing a web address, I understand that the pseudo code would be something like this:Code: <?php
$string='<img src="../../e-commerce_in_a_box_small.jpg" alt="E-Commerce" width="100" height="134" border="0" />';
// we need to find the system root and replace the ../ with REAL values.
$url='http://www.myointernational.com/test_dir/';
if($string contains '../'){
$number_of_them=count(the number of them);
}
$i=1
while($i<=$number_of_them){
$tmp_url=go up one level from the $url;
$i++;
}
?>
<img src="<?php echo $tmp_url;?>" alt="E-Commerce" width="100" height="134" border="0" />
How would I go about finding the code to make the pseudo code work?
fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and 1 chat site. all of this has led to a lot of hits but very few real clients. i just changed from a
function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the function just to see what the output is, and it sems to work. However, upon returning the function
Need understanding of this bit of code
Code: <?php // WHERE clause filters $arrSQLFilters = array(); // whether or not zip codes table needs to be included $boolIncludeZipCodes = false; // Zipcode filter
generating random codes
Hi guys n gals,I have a requirement to generate 250,000 unique codes...These codes are for a tracking service and will be stored in the database (table field has a unique index).Now I am working on
Add weeks in a query?
I have a SQL that summarizes the quantity per week. The weeks that has no value does not exist in the table. How can I add these missing weeks with a 0 value in the SQL. Need this to use Avg and
Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't make exactly what I thought it will. Can you give me a hand please. There we go:Code: [Select]
Help uploading .JPG
I have a problem with upload images when the ending is .JPG capitalized.. I really don't know what causes it to crash but been testing it for some time and it's my retrictions that won't allow it in.
login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php index.php . Now if i will not give correct detail i can not see the index.php ,all working perfect
search function
HI guys,if anyone could point us in the right direction of how to do this, or provide some test code for a similar problem would be great!Basically, I have user profiles on my site, and I have a
Login script (probably a simple error)
dbConfig.phpCode: <?// Replace the variable values below// with your specific database information.$host = "localhost";$user = "username";$pass = "password";$db