-
Posts
34 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by tazeha
-
-
the MySQL tutorial For me it is still unknown.. i don't knnow how save title , intro , details (price) .. in the tabel
please write example code.. thanks
-
I using PHP Simple HTML DOM Parser .
Now I write the mini script .
This script find the products online shopping with price.
<?phpinclude_once('simple_html_dom.php');// Create DOM from URLheader("Refresh: 300;");$html = file_get_html('http://wpu.ir/v3128');$articles = array();// Find all article blocksforeach($html->find('div#content') as $article) { $item['title'] = $article->find('h1', 0)->plaintext; $item['intro'] = $article->find('h3', 0)->plaintext; $item['details'] = $article->find('span.finalprice', 0)->plaintext; $articles[] = $item;}echo $title="<b>نام محصول:</b>". $item['title'] . "</br> ";echo $dec="<b>توضیحات:</b> ". $item['intro'] . "</br> "; echo $pr="<b>قیمت:</b> ". $item['details'] . " </br> "; //to fetch all images from a webpage$images = array();foreach($html->find('img') as $img) { $images[] = $img->src;}echo " $images[29]";?>
I have save price in table database mysql.. how can?
-
I using PHP Simple HTML DOM Parser .
Now I write the mini script .
This script find the products online shopping with price.
<?phpinclude_once('simple_html_dom.php');// Create DOM from URLheader("Refresh: 300;");$html = file_get_html('http://wpu.ir/v3128');$articles = array();// Find all article blocksforeach($html->find('div#content') as $article) { $item['title'] = $article->find('h1', 0)->plaintext; $item['intro'] = $article->find('h3', 0)->plaintext; $item['details'] = $article->find('span.finalprice', 0)->plaintext; $articles[] = $item;}echo $title="<b>نام محصول:</b>". $item['title'] . "</br> ";echo $dec="<b>توضیحات:</b> ". $item['intro'] . "</br> "; echo $pr="<b>قیمت:</b> ". $item['details'] . " </br> "; //to fetch all images from a webpage$images = array();foreach($html->find('img') as $img) { $images[] = $img->src;}echo " $images[29]";?>
I have save price in table database mysql.. how can?
-
w3school owner where are from country?
-
how save price with product name in database mysql..
-
Hello
I using PHP Simple HTML DOM Parser .
Now I write the mini script .
This script find the products online shopping with price.
but one problem is.
<?phpinclude_once('simple_html_dom.php');// Create DOM from URLheader("Refresh: 300;");$html = file_get_html('http://wpu.ir/v3128');$articles = array();// Find all article blocksforeach($html->find('div#content') as $article) { $item['title'] = $article->find('h1', 0)->plaintext; $item['intro'] = $article->find('h3', 0)->plaintext; $item['details'] = $article->find('span.finalprice', 0)->plaintext; $articles[] = $item;}echo $title="<b>نام محصول:</b>". $item['title'] . "</br> ";echo $dec="<b>توضیحات:</b> ". $item['intro'] . "</br> "; echo $pr="<b>قیمت:</b> ". $item['details'] . " </br> "; //to fetch all images from a webpage$images = array();foreach($html->find('img') as $img) { $images[] = $img->src;}echo " $images[29]";?>
the product's detail's.
name
price
image
description
...
in this loop
foreach($html->find('img') as $img) { $images[] = $img->src;}echo " $images[29]";
only display the image url not imge.
please help
-
I have to display random photo using array and rand function.
Now I would add text under each photo(For example, the words of the elders text with image)
my code:
What do I do?
<?php$images=array( array('file'=>'pic1','alt'=>"Your Description About pic1"), array('file'=>'pic2','alt'=>"Your Description About pic2"), array('file'=>'pic3','alt'=>"Your Description About pic3"), array('file'=>'pic4','alt'=>"Your Description About pic4"), array('file'=>'pic5','alt'=>"Your Description About pic5"), array('file'=>'pic6','alt'=>"Your Description About pic6"), ) $i=rand(0,count($images)-1); $selectimage="newfolder/{$images[$i]['file']}.jpg"; $alt=$images[$i]['alt']; if (file_exists($selectimage) && is_readable($selectimage)) $imagesize= getimagesize($selectimage);?>
view in html
<img src="<?php echo $selectimage;?> " alt="<?php echo $alt ; ?>" <?php echo $imagesize[3] ; ?> />
-
Hello
I'm from Iran Country.
My language is Persian.
in my countries is not a good web programming tuts website.
Can I translate w3school content to Persian Compliance with copyrights?
Thanks.
how save price with product name in database mysql..
in PHP
Posted
sorry, but I dont have only code.. I saw the tutorial but , don't know how save the varible title ,.. save to table.
first , I do connect the mysql with this code ..
but, after this I don't know how do save in table..
founded one code than save in table but so I don't know.
http://stackoverflow.com/questions/13868799/storing-php-simple-html-dom-results-to-mysql-db